Showing posts with label Technical Analysis. Show all posts
Showing posts with label Technical Analysis. Show all posts

Thursday, June 19, 2008

How to make sure you’re in a trend?

My system tries to identify whether the market is currently in a trend. For the human eye discovering whether the market or a specific stock is in a trend is relatively easy. Just look at the graph and if the line goes up or down then chances are it is in a trend.

Discovering whether the stock is in trend helps filter the signals generated when the trend is opposite to your system’s trend. I.e if I build a system which trade only bullish market, I need to disregard all trades generated when the stock was in a bearish move.

When building a computerized system things become a bit complicated and my way of overcoming this problem was to measure the values of two close prices, one for the current day and one in the past x days. If the current’s day closing price was higher than the closing price of the other closing price I assumed I’m in a bullish period.

Running a test for this rule did eliminate lots of false trades however, I encountered another problem. There were times when the closing price of the current day was higher than the closing price of the previous measured period but only due to a peak in the price. Meaning, the stock was in the opposite trend but the system used two prices which gave resulted in a false signal. The way I overcome this problem was to measure the two periods on a moving average of the closing price rather on the price itself.

image

That did the trick. obviously you would need to find the right period for the moving average since using small period will make the moving average act like the closing price series and large period might be too slow and the system can miss the trend or enter too late.

image

If you have any other questions about computerized system, please let me know.

Monday, May 12, 2008

Open positions for May 12th

Here is the status of my current holdings:

Symbol Entry Date Entry Price Current Price Profit %
RCCC 22/01/2008 44.13 44.40 0.61
SATC 05/05/2008 1.86 1.82 -2.15
ASTSF 05/05/2008 14.59 14.70 0.75

Thursday, February 21, 2008

What would you do?

Since trading at this point is just a hobby which I tend to change and become a full time trader I set myself a workout plan which include staying late two to three times a week and study the markets as much as I can by reading books on the subject, subscribing to various RSS blogs, developing and perfecting different systems and last but not least, writing this blog.

You could say I knew technical analysis was my cup of tea since the beginning. Graphs and different oscillators fascinated me from the beginning and since I come from the software industry I guess develop computerized systems was just an evolution thing. Developing computerize system takes a lot of time where one develop, test, tweak and do the whole thing over and over again  but once you are done all there is to do is follow the system signals, which most of you know, is not an easy task :).

Now here's my dilemma: I strive to improve myself by reading blogs, newsletters and books and thus hope to improve the way I trade. But since I follow the systems signals I find that reading about the current recession or the credit crunch or looking at a graph explain why I should buy gold is irrelevant to me.

I feel I have reached a point where reading few more posts in various blogs wont expand my knowledge in the direction I need.

Let me know what would you do in my place.

Tuesday, February 19, 2008

Keep track of the changes you make to your system

In the early stage of the system development I was a bit absentminded. Lots of idea went trough my mind while I was going to sleep and were hastily tested in the following day. I jumped from one setup rule to the other while trying to find my golden egg. As time passed and the system started to mature I have noticed I occasionally repeat testing the same rules I tested before. The reason for this was because I didn't keep track of the changes I made to the system. The funny part is that I work as software developer for more than 10 years. In the software industry you have no choice but to use Source Control Management (SCM) tools which allows you to keep track of the changes one or more developers have made to the application during its development stage. SCM is also useful for branching which is the act of going back to a previous version and start a different version. For example when you go from version 1.0 to version 2.0 but still need to support version 1.0 by writing fixes and updates.

To overcome the problem, what I did was keep track of the changes I made to the code in Excel file. I created a table with the following columns:

Version - I've decided to keep every change I made in the script to a new file and label it with a new version number for example 1.57, 1.58.

Based on version - as described above, a script might branch into several different scripts as you test different ideas based on the same version. This is why it's important to know what version your current code is based upon so you can track the changes made between two scripts incase you want to incorporate them later on.

Changes Made - a short description of the changes made to the script. This should be one or two sentences long and only need to remind you what was changed. For example Modified the SMA to use 50 days period instead of 100 or Added another check to make sure the stock is liquid enough by checking  the volume over a period of 3 months.

Using Monte Carlo tool I also collect the following statistical data regarding  the performance of the system:

No of trades - The total number of the trades issued by the system. You need to remember that the simulator generates numerous trades which are not used in the final simulation as they might overlap with each other. For instance a simulation might use 140 trades (for a given period) while the there are over 500 raw trades. When using Monte Carlo simulation, the program randomly uses all the raw trades in order to generate new simulations and thus make sure the system performance well if other trades were chosen.

Total Average Profit - used to measure the average profit of all the simulation runs. I use 2000 runs to check each version of the script to minimize the random effect. This means the program generate 2000 different simulations based on the raw trades and only then it calculate the average profit.

Yearly average profit - using the Monte Carlo program I can switch to different periods and check how the system performed in each of them.

Total Average Drawdown -one of the most important parameters you want to know about your system is how much money it might lose on average. This should suite your mental capabilities and should not be overlooked.

Yearly Average Drawdown - same as above but only on a yearly basis.

Probability to achieve X% Profit - using the average profit and average drawdown the program calculate the probability to achieve X% profit.

 

I believe keeping track of your work methodology is one of the most important steps bringing you closer to become a professional trader. In my mind tracking the changes signal you understand that becoming a trader takes time and effort and not working upon impulse.

For sample screenshots you might want to visit this blog entry.

Sunday, January 13, 2008

The making of a support line

Nasdaq-20080113

If we look in the chart above we can see how a new support for the Nasdaq composite index is being created around 2440. This tells me that bears who try to lower the price find resistance by the bulls who struggle to slow the momentum and reverse its direction.

The RSI position at 32 indicates the Nasdaq is overbought. We can see that 40 which was used as a support line since August was recently broken. Breaking the support usually turns the line to a resistance and if we look at previous times, in the last couple of years, when the 40 became a resistance we can see that it took the Nasdaq between 2 to 3 weeks until the resistance became support once again. This statistics is correct in bullish periods were corrections periods last about 2 weeks. If the RSI will get back above 40 in 2 weeks I'll consider the last month as a correction or should I say one deep plunge.