Thursday, May 18, 2017
Trade of the Year or Just Biz as Usual
The chart above is a very typical EL trade that you have seen in this bloh for some 8 years, although today's trade was really hard to miss. First entry was at the old EL entry with the CCI overbought and the market pulled back and ready to return to at least the mean. Second entry opportunity, you could call it a confirmation or a wake up call, was the confirmation that order flow had decided to sell. "They" began to unload again. It was then a matter of scaling out as price went down and hope that you don't run out of bullets, although there was an opportunity to reload if you did.
Sunday, April 16, 2017
Why Most Traders Fail
The answer to the question: "Why do most traders fail?" has been a source of research by many people, both within our industry and outside it.
I have had a lot of ideas about what the answer is and it is only now that I believe that I know why. Much of the reason has already been discussed in this blog. The missing part of the answer is that we take mental short cuts in our decision making. The problem is that these mental short cuts often don't work.
This "solution" became clear after reading The Undoing Project: A Friendship that Changed the World, a book by Michael Lewis of Liars's Poker fame. The Undoing Project describes the collaboration between two psychologists, Daniel Kahneman and Amos Tversky, who created the field of behavioral economics and won a Nobel prize in economics. Kahneman subsequently wrote Thinking, Fast and Slow and received the American Presidential Medal of Freedom.
I highly recommend both books if you want to understand how we can fool ourselves in our decision making process. It takes work to change the way we make decisions, especially if we are discretionary traders who make lots of decisions with not a lot of time to make them.
I have had a lot of ideas about what the answer is and it is only now that I believe that I know why. Much of the reason has already been discussed in this blog. The missing part of the answer is that we take mental short cuts in our decision making. The problem is that these mental short cuts often don't work.
This "solution" became clear after reading The Undoing Project: A Friendship that Changed the World, a book by Michael Lewis of Liars's Poker fame. The Undoing Project describes the collaboration between two psychologists, Daniel Kahneman and Amos Tversky, who created the field of behavioral economics and won a Nobel prize in economics. Kahneman subsequently wrote Thinking, Fast and Slow and received the American Presidential Medal of Freedom.
I highly recommend both books if you want to understand how we can fool ourselves in our decision making process. It takes work to change the way we make decisions, especially if we are discretionary traders who make lots of decisions with not a lot of time to make them.
Thursday, March 16, 2017
The Problem with Textbooks
Textbooks have become a problem over the years. The books themselves are better than ever, as they are up to date, in full color, and have lots of ancillary materials. What's not to like? But the downside is that their cost has risen beyond the means of most students. I have seen instances of the book price being higher than the course tuition.
In addition, students hate to read the book. They may scan an assigned chapter but rarely seen to read the whole thing. Most of today's students were brought up on video and the internet so are move visual acclimated and accustomed to reading short messages. A big book is an intimidator.
Some solutions I have seen include students sharing a book, using it in the library, or buying used or older editions online, Yet prices are still high. My recent ETD listserv survey indicated that cost was a major issue. And many are moving away from using textbooks in favor of using instructor-developed materials, online items and other free or low cost stuff. As a textbook author, I have noticed a marked decline in sales over the years. I know publishers are concerned but few have done much to solve the problem.
Ebooks are one solution that students can buy online without the bookstore mark up. Custom books are another possibility where you get to choose what chapters to include. Going to black & white from color is another option.
Another textbook problem is that they often do not cover the topics needed within a course. The books do a good job of covering the fundamentals but typically do not include the latest technologies. I wish the publishers would put out a series of chapter or white paper length modules on the various specialties like audio, video, wireless, solar and wind, automotive, IoT and many others. Make them in color and let students buy directly.
What are your suggestions for solving the textbook problem.
Cheers for now.
Lou
In addition, students hate to read the book. They may scan an assigned chapter but rarely seen to read the whole thing. Most of today's students were brought up on video and the internet so are move visual acclimated and accustomed to reading short messages. A big book is an intimidator.
Some solutions I have seen include students sharing a book, using it in the library, or buying used or older editions online, Yet prices are still high. My recent ETD listserv survey indicated that cost was a major issue. And many are moving away from using textbooks in favor of using instructor-developed materials, online items and other free or low cost stuff. As a textbook author, I have noticed a marked decline in sales over the years. I know publishers are concerned but few have done much to solve the problem.
Ebooks are one solution that students can buy online without the bookstore mark up. Custom books are another possibility where you get to choose what chapters to include. Going to black & white from color is another option.
Another textbook problem is that they often do not cover the topics needed within a course. The books do a good job of covering the fundamentals but typically do not include the latest technologies. I wish the publishers would put out a series of chapter or white paper length modules on the various specialties like audio, video, wireless, solar and wind, automotive, IoT and many others. Make them in color and let students buy directly.
What are your suggestions for solving the textbook problem.
Cheers for now.
Lou
Wednesday, March 15, 2017
Math Still a Problem
In response to my recent ETD Listserv survey, Philip Regalbuto of Trident Technical College sent me this note. He is right about math affecting enrollments and retention. I have noticed this in my past academic experience.
How do we fix these problems? Thanks, Philip.
Lou
Lou:
This past week the department was scheduling classes and I noticed that the
number of project student entering the 2nd year of our MET and AEET programs was
lager then in recent years. What the department has done is request a the Math
department teach an applied math course to our students rather than the
traditional college algebra. The number of students completing the applied
math course has increased dramatically. When our students would take the
college algebra class and any prerequisite classes we typically had 70 go in and
maybe 10 get out of the sequence Now we are seeing 40 -50 students coming out
of the new sequence, We also added a course in numerical methods were the
Engineering Technology department teaches students numerical methods that are
relevant to Engineering Technology problems.
My thinking is part of ET problem at 2 year college level is the math department
and how it teaches math.
Philip also had this to say about enrollments and advanced technologies.. Again he is right on.
> Lou:
> I think the reason for lack of new technologies to be included in EET programs
is that these new technologies are part of other departments, IE automotive or
the network systems . Colleges cannot afford to hire instructors who know about
these technologies because of the low pay in academia as compared to the pay in
industry. Most of the students I see also want to be an engineer, so they can
make the "Big Bucks" and get a four year degree. The push for STEM is what is
driving this. Stem promotes a 4 year engineering degree and ignores the
technicians with two year degrees.
Lou
Saturday, March 11, 2017
The #1 Problem for 2-Year Electonic Programs
I don't have to tell you what it is. We all know it and yet little is being done to solve it. I am referring to lack of new enrollments. My recent ETD Listserv survey confirmed that, in general, enrollments were down or flat at best in most U.S. programs. Only 38% of those responding indicated an increasing enrollment. All schools need a steady stream of new students to justify the faculty, facilities and equipment. And what about the employer needs? Where will the graduates come from if there are no students? Here's the way I see it.
- The jobs seem to be there. I regularly see ads for techs of all sorts. Most schools also seem to indicate the availability of jobs. Positions are going unfilled.
- If jobs are available but enrollments are still down, maybe the school is not responding to local company needs with appropriate courses or programs. Is that you?
- Do you have a plan to promote your program? If not, time to make one. Common issue: No time or money to do this. Excuses...
- One major issue is high school advisors are not promoting tech jobs or education. They push four-year degree programs in engineering not two-year degrees for techs. Yet this is a good maybe even a best option for many students. Go talk to the advisors and tell them the benefits.
- STEM does not seem to address the technician. Most STEM initiatives promote engineering and four-year degrees. What we need is a technician STEM effort.
- Another factor that I hear over and over again is that prospects for college do not know what electronic technology is or has only a vague idea of it. They also don't know what a tech is or what he or she actually does. Many tech jobs go by more specific names like computer tech, cable TV tech, manufacturing tech, robotics tech, cellular wireless tech and so on. Not electronic tech. Not sure what the solution is here. It has to do with educating the potential clients and high school advisors as well.
So there it is. The needs are still there. The solution being your program is there. Now how do we get the two together? Someone needs to seek a grant for this problem. The solution helps students, employers, the job growth, and the colleges. A have your cake and eat it too event.
What are your thoughts?
Lou
Trading Order Flow - the Series Part 3
Its pretty obvious that the criteria we are searching for as a trader is when to enter and when to exit. Obvious! But what traders don't seem to deduce from that fact is that the "when", to have a high probability of success, depends on the "where".
What does the "where" mean? It means finding trade locations where it is most likely that a trade can be entered and that it goes in the direction we propose that it goes.
OK, where are those places? For me, those places are where there was volume before that caused the behavior that I want to rely on. That means I am looking at extremes, VAHs, VALs, POCs, LVNs, HVNs. I also take into account where VALUE is moving.
The process is simple. Before tarting to trade I look at the previous day and the left hand side of the bar chart and mark the places where I COULD trade. When price gets to one of those places I look at the current context and order flow and put on a trade if I judge that the trade is viable . For it to be viable, I need to be able to see when the trade is wrong quite quickly and there has to be enough room in front of the trade to make a big enough of a profit. What those numbers are depends on style - whether you are a scalper who needs a high win rate or a trader who needs the ratio between their risk and reward potential to be a high enough R number.
The pic of the charts in the previous post gives me all that information.
What does the "where" mean? It means finding trade locations where it is most likely that a trade can be entered and that it goes in the direction we propose that it goes.
OK, where are those places? For me, those places are where there was volume before that caused the behavior that I want to rely on. That means I am looking at extremes, VAHs, VALs, POCs, LVNs, HVNs. I also take into account where VALUE is moving.
The process is simple. Before tarting to trade I look at the previous day and the left hand side of the bar chart and mark the places where I COULD trade. When price gets to one of those places I look at the current context and order flow and put on a trade if I judge that the trade is viable . For it to be viable, I need to be able to see when the trade is wrong quite quickly and there has to be enough room in front of the trade to make a big enough of a profit. What those numbers are depends on style - whether you are a scalper who needs a high win rate or a trader who needs the ratio between their risk and reward potential to be a high enough R number.
The pic of the charts in the previous post gives me all that information.
Saturday, March 4, 2017
The Coding School Model
Many electronic technician jobs do not require an AAS degree. But these jobs do require certain knowledge and skills that can be taught in a shorter amount of time. The jobs are usually related to manufacturing, service and repair, installation and field service. It may be time for colleges to consider some kind of shorter certificate program that could put graduates to work sooner and fill all those available job openings.
This is being done right now to teach programming. With so many programming jobs available there have not been enough college graduates to fill these good positions. This need has fostered the creation of coding schools, special for-profit organizations thaat teach programming. These coding school programs typically last for 12 weeks and cost about $10K to $20K. High cost for sure.
The result is that students learn basic programming skills fast and companies are hiring them into entry level programmer positions. The pay is good and the prospects for promotions are excellent based upon performance.
A recent Wall Street Journal article pointed out that today there are 91 full time coding "boot camps" in the U.S. These produced 18,000 graduates in 2016. More are on the way.
What I am asking here is why not create a similar program for electronic techs? This could be done by some entrepreneur who would create a program and a for-profit school. Such a school would be competitive with community college programs so why not avoid this and create such a program inside your college. It would bring in more students and fill the needs of some employers. I visualize a 12-week program that would not be as expensive as the coding schools, maybe half of what they charge.
I am not sure all what such a program would teach. Probably some fundamentals but heavy on the practical hands-on skills like soldering, test instrument use, and basic troubleshooting. I will think about this and put together an outline. Let me know if you are interested.
While I was teaching at the local community college, we offered a one semester certificate program that ran 8 hours per day 5 days a week. It was make up of standard courses taught on an accelerated basis. It was too intense for many students and instructors. But it was successful and graduates did get hired. A program tailored to the available jobs is a better way to go.
With some electronic tech programs in decline this could be a way to solve the enrollment decreases. Some promotional effort would be needed to find the students and let employers know about it. That is always an issue but it is the same for promoting your existing program. Nevertheless, it may be something to try if you need to stem the declines. It is time to innovate. Be bold.
What do you think?
This is being done right now to teach programming. With so many programming jobs available there have not been enough college graduates to fill these good positions. This need has fostered the creation of coding schools, special for-profit organizations thaat teach programming. These coding school programs typically last for 12 weeks and cost about $10K to $20K. High cost for sure.
The result is that students learn basic programming skills fast and companies are hiring them into entry level programmer positions. The pay is good and the prospects for promotions are excellent based upon performance.
A recent Wall Street Journal article pointed out that today there are 91 full time coding "boot camps" in the U.S. These produced 18,000 graduates in 2016. More are on the way.
What I am asking here is why not create a similar program for electronic techs? This could be done by some entrepreneur who would create a program and a for-profit school. Such a school would be competitive with community college programs so why not avoid this and create such a program inside your college. It would bring in more students and fill the needs of some employers. I visualize a 12-week program that would not be as expensive as the coding schools, maybe half of what they charge.
I am not sure all what such a program would teach. Probably some fundamentals but heavy on the practical hands-on skills like soldering, test instrument use, and basic troubleshooting. I will think about this and put together an outline. Let me know if you are interested.
While I was teaching at the local community college, we offered a one semester certificate program that ran 8 hours per day 5 days a week. It was make up of standard courses taught on an accelerated basis. It was too intense for many students and instructors. But it was successful and graduates did get hired. A program tailored to the available jobs is a better way to go.
With some electronic tech programs in decline this could be a way to solve the enrollment decreases. Some promotional effort would be needed to find the students and let employers know about it. That is always an issue but it is the same for promoting your existing program. Nevertheless, it may be something to try if you need to stem the declines. It is time to innovate. Be bold.
What do you think?
2017 Survey of 2-Year Electronic Technology Programs
In case you did not see this earlier, here are the results of the recent survey of 2-year electronic technology programs. Thanks to all of you who participated. And special thanks to the ETD Listserv at Texas A & M University for hosting this survey.
I particularly enjoyed the extensive comments. There are too many to post here but I have boiled them down and summarized to save space. I have concluded with some of my own commentary.
NOTE: Some percentages do not add up to 100% because not all questions were answered and/or multiple choices were given per question.
The outcome of the survey is interesting and hopefully this current picture of electronic technology programs will help you improve your own program.
Best wishes to you all.
Lou Frenzel
1. The enrollments in my ET program are:
a. Up 28%
b. Down 38%
c. Flat 28%
Comments:
* Program closed. Still teach several electronic courses as part of other programs.
* Program has been suspended.
2. Have you added any new courses or programs recently?
a. No 45%
b. Yes What? 55%
Courses/programs added: Internet of Things, SCADA, process control, mechatronics, alternative energy, PLCs, motor control, avionics, senior project.
3. What electronic specialties do you teach?
a. Computers (PCs) 45%
b. Networking 34%
c. Communications/wireless 45%
d. Industrial 55%
e. Other What?
Specialties taught: Generic electronic tech, PCB fabrication, wind energy, power generation, DAQ.
4. What approach does your program take?
a. Theory/circuit oriented 76%
b. System oriented 21%
c. Service and repair 21%
d. BSET prep. 24%
e. Other What?
Other approach: Minimum theory/low math, maximum hands-on.
5. Do you teach programming?
a. No 21%
b. Yes What language? 79%
Languages taught: C/C++ (91%), Assembly (35%), Python (17%), BASIC (13%)
6. Do you use virtual instruments in the lab?
a. Yes 55%
b. No 38%
7. Are jobs currently available for graduates?
a. No 14%
b. Yes What field? 76%
Jobs available: General electronic tech, mechatronics, PLCs, automation, wind and solar, avionics, drones, industrial service and maintenance, instrumentation.
8. What is your current greatest need or issue?
* More students, more and better marketing and outreach.
* More faculty
* More space
* More funds for equipment, software
* More jobs than interested students.
* Potential students do not know what electronics is.
9. How do you fulfill the need for faculty continuing education?
* Little or no support or funds from the colleges.
* Faculty must seek it out for themselves.
* Some use of online courses, conferences, webinars, workshops.
10. What major technology or employment trend do you see that should be addressed?
* Growing emphasis on manufacturing, automation, industrial controls and communications, PLCs, Internet of things.
* Network security issue.
* Students with programming skills seem to progress quicker in industry.
11. Do you still use standard textbooks?
a. Yes 76%
b. No 17%
Comments: Textbooks have become too expensive. The trend is to only use class notes, handouts, and online materials. Texts� content often does not match up with courses taught.
12. Do you offer online courses?
a. Yes 45%
b. No 55%
Why not?
Comments: Some have hybrid courses, online plus college-based lab and testing. Many instructors are not sold on the idea. There is a problem in implementing the hands-on lab component of most courses. Online courses have a high drop out rate.
Personal comments and opinion:
My Background (in case you want to know who Lou Frenzel is):
� 17 years as a department head, professor and adjunct in 2-year AAS degree electronic programs at three community colleges and one technical school.
� 25 years as both a technician and engineer in the electronics industry.
� Devoted hobbyist and electronics experimenter and ham (W5LEF).
� Author of 26 books on electronic and computer subjects.
� Currently an electronic industry analyst, researcher, and writer.
Comments:
� I was sorry to see the collective 66% down/flat enrollment figure. What is wrong? Better marketing and recruiting are a must if jobs are to be filled.
� I was happy to see more programming activity as this is one skill that will take students and graduates beyond the tech level if they are interested.
� Looks like industry and manufacturing, automation, and PLCs are the healthiest job areas. Robots were never mentioned but they may be a part of the manufacturing and automation results.
� I was surprised to see little or no mention of wireless. It is currently the largest and fastest growing segment in electronics. Cellular is booming with 4G LTE rollout and 5G development including continuous upgrades in Wi-Fi. New dedicated short range communications (DSRC) systems for vehicle-to-vehicle (V2V) is coming soon to all cars and trucks. The Internet of Things movement is a hot growth area. Guess the jobs are not there yet or known about.
� No mention of automotive electronics but it is a fast growing segment in electronics because of the development of the advanced driver assistance systems (ADAS) like auto braking, lane departure, backup cameras, etc. as well as self driving and electric cars. The auto tech of the future will be an electronic tech.
� Textbook publishers should heed the warnings in this survey as the book prices have gone out of sight and content does not exist for some subjects taught.
� I am worried that faculty may not be current with the latest technologies, components, methods, test instruments, etc. for lack of continuing education. Hopefully most faculty members are autodidacts and learn on their own.
Tuesday, December 27, 2016
Trading Order Flow - the Series Part 2
This is the same pic I posted recently. Lets look at what I have on the chart.
The large chart gives a larger view of what's going on. It doesn't really matter what the periodicity is - it can be 1 minute, 9 tick range, 99 contract volume - anything really because we are going to trade order flow. The periodicity is to break the bars into volume measurable significance and to allow the indicators to fill in some of the contect.
We then have Market Profile or Volume Profile. This an importand part of the context. Finally, I have a chart that mirrors the main chart's last few bars but with the inside the bars information exposed.
Lets talk about context. Exactly what is it? I started talking about context in this blog from the beginning years and years ago. Since then I have seen it mentioned all over the web but without it being explained.
Context has a number of components which include;
- what is the trend
- where is the mean
- how over bought or over sold are we
- where is value
- where are the edges of value
- where is the centre of value
- how is volume moving
More to come in subsequent posts.
Thursday, December 15, 2016
A Workman and His Tools
There's really only one constant in trading and that's Order Flow.
With the advent of personal computers in about 1979, markets began a series of changes. My Apple II was great in 1980 using CompuTrac software to provide daily technical analysis. This then went to Intraday analysis using the same but evolved CompuTrac software.
The tools became more sophisticated as PCs got better. The next big thing was 1993 when the internet opened up to private individuals. This coincided with Microsoft Windows appearing. This brought a host of software tools to help traders.
PC, software and the internet all improved and then markets went electronic. I left the floor in about 1991 and traded off a DTB terminal for a while until software appeared that made trading from home possible. This is when algos started making their appearance in a bigger way.
Today there are people that are estimating that algos are somewhere between 80% and 90% of the market.
Without updating the tools, traders don't have a chance against the algos. We need to use tools to both disclose order flow, analyze it and then semi-automate the execution. I'll write more about this in subsequent posts.
With the advent of personal computers in about 1979, markets began a series of changes. My Apple II was great in 1980 using CompuTrac software to provide daily technical analysis. This then went to Intraday analysis using the same but evolved CompuTrac software.
The tools became more sophisticated as PCs got better. The next big thing was 1993 when the internet opened up to private individuals. This coincided with Microsoft Windows appearing. This brought a host of software tools to help traders.
PC, software and the internet all improved and then markets went electronic. I left the floor in about 1991 and traded off a DTB terminal for a while until software appeared that made trading from home possible. This is when algos started making their appearance in a bigger way.
Today there are people that are estimating that algos are somewhere between 80% and 90% of the market.
Without updating the tools, traders don't have a chance against the algos. We need to use tools to both disclose order flow, analyze it and then semi-automate the execution. I'll write more about this in subsequent posts.
Monday, December 12, 2016
Digital Decimation Filter Using FPGA Board.
Our task is to describe in VHDL, Test, and implement a DSP circuit called Decimation Filter. This one has two main sections: the CIC section and the FIR section.
Even the CIC and the FIR filters are composed of many sections thats we are going to describe them one by one.
Both sections consist of N stages each. The exact structure of each stage, and the way of connecting all stages together are presented below in this article today.So let's start by introducing a Decimation filter.
A Decimation Filter is one of the most used filters in signal processing and noise avoiding sustems.
Basically a decimator is a digital low pass filter, which also include the operation of sample rate reduction. He does operation of noise shaping and hence the noise is pushed to higher frequencies so that the decimation stage following the modulator can filter out this noise above the cutoff frequency.
The band limited signal can then be resampled by discarding X � 1 samples out of every X samples, where X being the oversampling ratio. By averaging X samples out of the quantized sigma-delta output.
The decimation filter achieves a high output resolution and also the frequency of the output data is at twice the input signal bandwidth which is the nyquist rate.
So to concluse how decimator filter work:
This is our input signal X(n):
We want to decimate this signal wiith decimation ratio R = 2.
This means thats we are going to generate a Y(n) decimation response of X(n) with the half frequency of X(n) = 0.5 Hz.
In digital signal processing, decimation is the process of reducing the sampling rate of a signal. Complementary to interpolation, which increases sampling rate, it is a specific case of sample rate conversion in a multi-rate digital signal processing system. Decimation utilises filtering to mitigate aliasing distortion, which can occur when simply downsampling a signal. A system component that performs decimation is called a decimator.
So Decimation filter is a low pass filter able to decrease sampling rate, it is composed by mixing a CIC Filter with a Fir Filter.
Cascaded integrator�comb filter :CIC Filter
A CIC filter consists of one or more integrator and comb filter pairs. In the case of a decimating CIC, the input signal is fed through one or more cascaded integrators, then a down-sampler, followed by one or more comb sections (equal in number to the number of integrators). An interpolating CIC is simply the reverse of this architecture, with the down-sampler replaced with a zero-stuffer (up-sampler).
Where:
- R = decimation or interpolation ratio
- M = number of samples per stage (usually 1 but sometimes 2)
- N = number of stages in filter
Characteristics of CIC Filters
- Linear phase response;
- Utilize only delay and addition and subtraction; that is, it requires no multiplication operations
CIC Filter is composed by mixing integrators,comb blocks with frequency dividers.
Integrator:
A digital integrator block is a block who add the previous result with present input to generate present output so simply :
Y(n) = Y(n-1) + X(n)
To create this block in VHDL, you have to use an intelligent way in program who help you to control your input signal delayed and to avoid critical value who could generate incorrect result specially when we look for Y(0).
Comb:
The principal function of a comb filter is mixing a delayed version of a signal to itself.
Y(n) = X(n) + X(n-RM)
When both R and M are positive constants:
CIC Filter is like i said before a collection of Integrator Filter equal to a collection of a Comb Filter when Integrators work inside a simple frequency and Comb Filters work inside the same frequency divided by the decimation ratio.
Here is the global RTL of our CIC filter:
We cant talk about CIC filter without mentioned a block named Frequency divider, this one is a generator of clock slower thant our initial clock.
In fact, he is no more than a simple circuit based on a simple front counter.
Exactly like this Test bench here explain for every 4 initial clock (Red signal) we generate one clock slower edge(blue signal).
To build your own CIC Filter, all what you have to do is to :
- Chose N : Filter ordre, (4 in my exemple)
- Select R : Decimation ratio. (4 in my exemple)
- Build your Integrator stages.
- Build your Comb stages.
- Build your frequency Divider block.
- build the top level CIC_Filter mapping all those blocks together.
Finite Impulse Response :FIR Filter
Wikipedia define Fir Filter as a filter whose impulse response (or response to any finite length input) is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have internal feedback and may continue to respond indefinitely (usually decaying).
The impulse response (that is, the output in response to a Kronecker delta input) of an Nth-order discrete-time FIR filter lasts exactly N + 1 samples (from first nonzero element through last nonzero element) before it then settles to zero.
FIR filters can be discrete-time or continuous-time, and digital or analog.
We could simply define it as a low pass filter made using convolution of the inputs signals with their impulse response.
where:
- x[n] is the input signal,
- y[n] is the output signal,
- N is the filter order; a Nth-order filter has (N+1) terms on the right-hand side
- bi is the value of the impulse response at the i�th instant for 0<= i <=N of a Nth-order FIR filter. If the filter is a direct form FIR filter then is also a coefficient of the filter
So to implement this filter using VHDL all what you have to do is to follow this architecture here :
In your program you have to use an array when you will put inside it your inputs signals delayed to facilate program algorithme.
A simple test bench of our Fir filter give:
We could verify results value by putting somes inputs signals inside a Fir block in Labview or Matlab simulink and comparing it together.
Decimation Filter:
Now after bulding the CIC Filter and the FIR we have just to connect them together to have the final decimation filter.
Here is the top Level RTL of the global Work.
___________
___________
After bulding and mapping all those blocks together a final test bench give
Top Level VHDL Code is :
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 13:17:33 12/11/2016
-- Design Name:
-- Module Name: Decimation_filter - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity Decimation_filter is
Port ( Xin : in STD_LOGIC_VECTOR (7 downto 0);
Yout : out STD_LOGIC_VECTOR (7 downto 0);
clk : in STD_LOGIC;
h0: in std_logic_vector(7 downto 0);
h1: in std_logic_vector(7 downto 0);
h2: in std_logic_vector(7 downto 0);
h3: in std_logic_vector(7 downto 0);
rst : in STD_LOGIC);
end Decimation_filter;
architecture Behavioral of Decimation_filter is
component FIR port
(clk: in std_logic;
rst: in std_logic;
x: in std_logic_vector(7 downto 0);
h0: in std_logic_vector(7 downto 0);
h1: in std_logic_vector(7 downto 0);
h2: in std_logic_vector(7 downto 0);
h3: in std_logic_vector(7 downto 0);
y: out std_logic_vector(7 downto 0));
end component;
component comb2 port
(rst : in STD_LOGIC;
clk : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (10 downto 0);
y : out STD_LOGIC_VECTOR (9 downto 0));
end component;
component comb3 port
(rst : in STD_LOGIC;
clk : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (9 downto 0);
y : out STD_LOGIC_VECTOR (8 downto 0));
end component;
component comb4 port
(rst : in STD_LOGIC;
clk : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (8 downto 0);
y : out STD_LOGIC_VECTOR (7 downto 0));
end component;
component comb port
(rst : in STD_LOGIC;
clk : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (11 downto 0);
y : out STD_LOGIC_VECTOR (10 downto 0));
end component;
component first_integrator port
(clk : in STD_LOGIC;
rst : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (7 downto 0);
y : out STD_LOGIC_VECTOR (8 downto 0));
end component;
component second_integrator port
(x : in STD_LOGIC_VECTOR (8 downto 0);
y : out STD_LOGIC_VECTOR (9 downto 0);
clk : in STD_LOGIC;
rst : in STD_LOGIC);
end component;
component third_integrator port
(clk : in STD_LOGIC;
rst : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (9 downto 0);
y : out STD_LOGIC_VECTOR (10 downto 0));
end component;
component last_integrator port
(clk : in STD_LOGIC;
rst : in STD_LOGIC;
x : in STD_LOGIC_VECTOR (10 downto 0);
y : out STD_LOGIC_VECTOR (11 downto 0));
end component;
component frequency_divider port
(clk : in STD_LOGIC;
rst : in STD_LOGIC;
clk_out : out STD_LOGIC);
end component;
signal aymen1 : std_logic_vector(0 to 8);
signal aymen2 : std_logic_vector(0 to 9);
signal aymen3 : std_logic_vector(0 to 10);
signal aymen4 : std_logic_vector(0 to 11);
signal aymen5 : std_logic;
signal aymen6 : std_logic_vector(0 to 10);
signal aymen7 : std_logic_vector(0 to 9);
signal aymen8 : std_logic_vector(0 to 8);
signal aymen9 : std_logic_vector(0 to 7);
begin
v1:first_integrator port map (clk,rst,Xin,aymen1);
v2:second_integrator port map (aymen1,aymen2,clk,rst);
v3:third_integrator port map (clk,rst,aymen2,aymen3);
v4:last_integrator port map (clk,rst,aymen3,aymen4);
v5:frequency_divider port map (clk,rst,aymen5);
v6:comb port map (rst,aymen5,aymen4,aymen6);
v7:comb2 port map (rst,aymen5,aymen6,aymen7);
v8:comb3 port map (rst,aymen5,aymen7,aymen8);
v9:comb4 port map (rst,aymen5,aymen8,aymen9);
v10:FIR port map (aymen5,rst,aymen9,h0,h1,h2,h3,Yout);
end Behavioral;
If you want to have a copy of any block vhdl code just contact me, Just contact me.
See you Soon AYMEN LACHKHEM
Saturday, December 3, 2016
Everything Old is New Again
As we come to the end of 2016 I thought I'd summarize where I am now with day trading.
When you look at the chart below, you will see the same ols same old plus a whole lot of new stuff to help with both the decision making and the execution.
Nothing has changed about the basis of trades: its either outside in: fade the moves, or, inside out: trade the pullback in the trend.
What has changed since I started this blog in 2009? Well, all the futures pits are gone. No more locals. We're now all electronic locals.There's no middle man or buffer for our trades. Except for the algos. And that's a big "except". The "except" is now somewhere between 70% and 90% of the volume (depending on who you ask).
And why does that matter? It matters because the rhythm of the markets have changed and the way in which orders appear has changed. We have words such as "HFT", "submarine" and "iceberg" that have taken on a whole new meaning.
However, happily, the technology has advanced in leaps and bounds. Seeing order flow has never been easier. And order flow is what we need to see in order to trade successfully.
The workspace below is what I trade off. I've upgraded to 27 inch 4k monitors to give me more room and granularity. NinjaTrader 8 is out. The charts are my same range bars but with a ton of order flow information. I'll tell you more about how I use the information in subsequent posts.
When you look at the chart below, you will see the same ols same old plus a whole lot of new stuff to help with both the decision making and the execution.
Nothing has changed about the basis of trades: its either outside in: fade the moves, or, inside out: trade the pullback in the trend.
What has changed since I started this blog in 2009? Well, all the futures pits are gone. No more locals. We're now all electronic locals.There's no middle man or buffer for our trades. Except for the algos. And that's a big "except". The "except" is now somewhere between 70% and 90% of the volume (depending on who you ask).
And why does that matter? It matters because the rhythm of the markets have changed and the way in which orders appear has changed. We have words such as "HFT", "submarine" and "iceberg" that have taken on a whole new meaning.
However, happily, the technology has advanced in leaps and bounds. Seeing order flow has never been easier. And order flow is what we need to see in order to trade successfully.
The workspace below is what I trade off. I've upgraded to 27 inch 4k monitors to give me more room and granularity. NinjaTrader 8 is out. The charts are my same range bars but with a ton of order flow information. I'll tell you more about how I use the information in subsequent posts.
Tuesday, November 1, 2016
From Sea to Shining Sea
This was a very typical trade to look for every day. The fact that it happened on the RTH open only made it easier as the market was going to look for balance and was even more likely to hit the VAL.
There are now many tools for looking at the orderflow. Some are better than others. While I use a proprietary add-in to NinjaTrader 8 and to MultiCharts.net that I have shown earlier in this blog, there are others such as the commercial Gomi which you can see here. While non of the commercially available tools have all that I want (hence using something tailor made) many of them do provide the basics to show what is happening in the orderflow.
There are now many tools for looking at the orderflow. Some are better than others. While I use a proprietary add-in to NinjaTrader 8 and to MultiCharts.net that I have shown earlier in this blog, there are others such as the commercial Gomi which you can see here. While non of the commercially available tools have all that I want (hence using something tailor made) many of them do provide the basics to show what is happening in the orderflow.
Saturday, August 20, 2016
Stop Using Proteus ARES ? Here Is My EAGLE PCB Tutoriels Step By Step ?
Stop Using Proteus ARES !! Here is my EAGLE PCB tutoriels
Hello dears followers, Today i came with a new idea completly different of my usually published articles. I m not going to talk about a MCU or a program style. My global idea today is just like it showed in article's title '' let's stop using proteus ARES to make our PCB".
I have been doing a fair bit of PCB design work of late, and I always used to use Proteus for schematic drawing, sometimes simulating and PCB design. So why not to use some other software more professional ?
The idea was started with me since 3 years ago when i just noted that's there is a sofware named EAGLE Cadsoft more professional than Proteus specialy in making PCB Design.
So Today i m going to show you:
- How to install Eagle Cadsoft, Patch it to make it professional.
- How to update library in Eagle.
- How to make a simple project (schematic + PCB).
- How to make a advanced project (Schematic + Layout).
Before that let's just make a little comparison between Proteus and Eagle.
Proteus is an all in one product from schematics to board layout through to simulation on a high level. Eagle is schematics and board layout design software only, no practical simulation . They're very different products. Proteus is used in schools because somehow they've managed to sweetheart a deal for extremely low cost to free licensing on that level in hopes to net students into depending on it for their professional carers. Eagle is used because it uses industry standards, and although not as newbie friendly it is technically full featured, even the free version.
For it's function features and price, Eagle is the only real 'solution' out there. There are many other choices, all which will require a learning curve and design of new libraries for components.
There is a Lot of PCB creating Software, let's be honest and said that the big advantage of Proteus is Simulation part, but my article's title is about making pcb and here we have to be sure all of us that's Eagle is totaly better than Ares in this point.
Here is my graduation project 3 years ago maked using Eagle Cadsoft.
And here is the pcb
I m sure that's in making my PCB in ARES i found more than one problem specially when i search for component, many of them i was forced to created. Also library problem and, i could just in one word said thats ARES is LIMITED front of EAGLE.
Download and installing and patching Eagle.
All what you have to do is to click here to download your eagle professional version. CLICK ME.
A compressed file you will receive in few minutes.
- Run eagle-win-6.5.0.exe. (same file from official website)
- Click "Setup" and the installer will start.
- Run the installation and then select to "Run as Freeware". Installation completes.
- Start Cadsoft Eagle software. (Select "Run as Freeware" again if asked)
You will see "Control Panel - EAGLE 6.5.0 Light" as the title of the window.
- Open Cadsoft Eagle installtion directory and look for 'eagle.exe' (example: C:\Program Files (x86)\EAGLE-6.5.0\bin)
- Make a copy of "cadsoft.eagle.professional.6.5.0-patch.exe" in the directory in which 'eagle.exe' was found.
- Run "cadsoft.eagle.professional.6.5.0-patch.exe" as administrator.
- Click 'Patch' and you're done! You will receive a message in the patch software saying "---PATCHING DONE---"
- You can now delete "cadsoft.eagle.professional.6.5.0-patch.exe" from the Cadsoft Eagle installation directory.
- Start Cadsoft Eagle.
You will see "Control Panel - EAGLE 6.5.0 Professional" as the title of the window.
Here is a step by step video of how to download and to install it. Enjoy
Library Using and update.
I just put with my eagle a big library which include a big part of component, so when you open a new project and a new schematic inside it. Just click in Library and Click use and click all library included here: (example: C:\Program Files (x86)\EAGLE-6.5.0\lbr). That's it.
Make your own simple project in Eagle.
I m going to make the most famous and easy circuit in electronic which is 5V Regulation
The Layout Design will look like:
And here is a step by step Video demonstrate how i did it:
This circuit like he is known give us a regular ready 5V from a 12V.
MAX/RS232 TTL To Serial Interface inside Eagle.
This Circuit is so used in interfacing MCU with external world, many of developpement board just include this one and here the schematic:
The Layout:
And here a video of how i did this circuit and layout step by step.
2 Motor Control with L293D
L293D is Circuit able to control two DC motor with a variation in speed and direction, he is strongly used in robotic world.
here is the schematic :
And here is the Layout: (you could make better i just wanted to show how is easy to use straps)
Here the video:
Make an advanced PCB Project inside Eagle.
This is the advanced project thats i m going to do. In fact it include an ATMEGA MCU, a connectors for all his digital pins, and a max232/rs232 interface, a motor control based in l293D so we could just said thats we are making a developpement board for our MCU.
and like always here a long video demonstrate how i did that.
Schematic
Layout
And here the video
See you soon, AYMEN LACHKHEM
Subscribe to:
Posts (Atom)















