Going through my source files, I came across one of my old projects. A very interesting one...that I eventually somehow forgot about..till I saw it today. I had code-named the project 'Turtel'. It's undocumented in the sense that I never mentioned it in the Blog.
The project was an attempt to understand the effectiveness of different indicators and strategies if used in the stock market.
I was also exploring Design Patterns at this time. The project became multi-purposed - to improve my understanding of the patterns (I seemed to have used the Strategy Pattern and the Factory pattern in my implementation) and explore the effectiveness of investment strategies.
Here is a link to the last version (I believe) - where I left off -
Project TurtelThe page above is not very interactive. But what it does is very cool (imo :)). You pass along 5 variables in the query string: fee, P, K, symbol, days, show
Fee is the transaction fee per purchase/sale
P and K are used for cross-overs I believe - values of 10 and 2 for example mean when the 10 day SMA crosses the 2 day SMA etc...
Symbol is the stock symbol - as listed in Yahoo (for example RIM would be RIM.TO)
Days indicates the number of days of data to use - a value of 100 would mean use the last 100 days of data
Show indicates whether to show the dates and quantities of transactions. A value of 1 means "yes, do show"; anything else means "no, don't"
Two strategies were implemented at the time - SMA cross-over and I think MACD cross-over. The outputs are based on these two.
Here is an example of the URL with the query string. The bolded parts are what you would change to see the output for the new values.
http://www.ai-projects.info/Turtel/sim/driver.php?P=
10&K=
2&days=
501&show=
1&symbol=
RIM.TO&fee=
0May be I shall continue this project some day. But for now its probably going to stay in its suspended state. This is one of the reasons I like to look into my old stuff - I usually find something interesting :)
Labels: php, programming, project, turtel