Sister page assignment_6_integrated_prototype
I put a lot of thought into the conceptual model for this project, and future projects. I have more grandiose plans of where I want this to grow into, and I look at this project as a pre-cursor and learning method in order to implement a more encompassing project.
My project is very different in conception than what we have been doing in class. My project has the notion of: Here is a past-proven method of trading that you might use into the future, based on past data. It primarily uses backtesting of technical market data, to come up with which method out of MANY methods, is best. The many methods are currently one strategy of buy and sell, with changing variables, therefore slightly modifying the strategy thousands+ times automatically. Each method is determined and run with a built from scratch evolutionary algorithm. The best of the best survive, and hopefully we end up getting a very fit-tested method and strategy.
The excel application replicates real stock market data and the trading strategy of an investor. The investor owns some cash and shares of a stock at the beginning of day 1. From then on, the investor uses a buy/sell strategy that depends on the recent stock price changes. The current strategy, described on the Inputs sheet, is a version of “buy low/sell high.” Output of this strategy is put on the Summary and Comparison sheets. You can also utilize an advanced Evolutionary Algorithm mode to have the computer automatically test thousands+ combinations of input modifications to attain the fittest output.
The power in this application is not yet reflected, but it is setup to allow future modularity for alternative strategies, new and different data, and heavy worksheet modification with no recoding effort.
The stock price, on the ‘Model’ worksheet, gets its data from Yahoo! Finance.
There are obvious downfalls to my method that I am aware of. Some I have plans to remove or expand, others I need to think on it longer.
Basically, I would like to marry my current technical analysis and medium-term trading methods, with the fundamental analysis methods learned in class. I want the entire system to be very modular, and able to easily implement new data sets (news consensus data, macro data, industry data, etc). Please see my conceptual brainstorm drawings below for details. Much of it is already reflected in this current project.
The following link contains very detailed implementation notes that I did.
Basically I felt that I implemented most of the required concepts, with a key exception of Portfolio Optimization. I guess I am not getting the $100 million! The reason, is that I have still not crafted a solid plan and answer as to how I will implement this for multiple stock tickers, and therefore a portfolio of stocks. As you can see on my dream project concept, I have included portfolio optimization and put thought into it. I also have some ideas of how I can implement it, but it is a tougher problem than to solve in just a few weeks.
These same instructions are included on the first worksheet of the application and their original location at assignment_6_integrated_prototype.
You can view/change the inputs first or run the simulation with the current inputs. Try changing inputs, and re-running the simulation, comparing their outputs.
After experimenting with the simulation and inputs, you can use an automated evolutionary method of changing the inputs and re-running of consecutive simulations by clicking the Run Evolutionary Algorithm. Many simulations will run fully automated, giving many results.
I did a reasonable job at matching the general meaning, effort, and purpose of the assignment. I did not at all match the 11 page description to a tee, but I put forth much more effort and man hours than needed. I would estimate it took me around 40 man hours to get it integrated, coded for future modifications and real world use, and documented out the wazoo. The only exception is that there is no inclusion of Portfolio Optimization. I considered it deeply in planning and sketching of the conceptual design, but I am unable to come up with the hours required for me to implement properly into my project at this moment.
At first, I was using Compustat data, it is nice and fast and integrated once you get it working. The combination of two aspects below stopped me from using it in this project. I may come back to compustat if I implement caching of data.
Yahoo has CSV data for market data, and some financial statements. I only wanted market data for the time being, so this was kind of the easy way out. Other good stuff:
I did not per say forecast anything explicitly, but instead came up with mini forecasts, by trying to setup a system that will allow easy and extensive toying with buy/sell strategies.
This is the only category that I was unable to imagine or begin to work on integrating into my project. Because my project is from such a different viewpoint, and because it still is only dealing with single stocks, I cannot implement a multi-stock portfolio.
My future plan is to first implement another looping mechanism around the entire evolutionary process, that does it each for a different stock. Once I have results for multiple stocks, if I implement a more robust real-world trading strategy, and/or I implement Neural Nets as a “strategy”, I can imagine the system being able to feed to a portfolio optimizer.
Idea to self: Either that, or I have multiple prices(stocks) as inputs from the get-go, and I am constantly calculating a portfolio risk-rewards procedure during each and every replication.
The entire project is based off of constantly backtesting over and over and over again to see which strategy / method worked the best over time in the past. We hope that because a method showed promise in the past, that it could keep it up in the future, becoming a sort of “generic solution” or at least better than “buy and hold”.
Idea to self: Maybe I can use Roy’s more classical method for stock selection on good fundamentals, and value assessment, then use mine to tell me when to trade these stocks in order to do better than “buy and hold” or better than the market.
What I did is comparable in complexity to what was done in class, because I implemented an evolutionary algorithm from scratch and with very little formal knowledge on the subject. I had my own intuitions of evolution in general, and how it equates to the computer world and algorithms for it. I also did additional research on it, located at http://nickyeates.com/personal/school/financialitsystems_is698/assignment_5_intelligence#planning_evolutionary_algorithm
I have many ideas for where this can go. As an integrated project, my long term hopes are that this setup drastically changes or shifts to envelope more data, many more effective strategies or forecasting methods, more complex artificial intelligence, and portfolio optimization. I want technical and fundamental methods to work hand in hand, as they each have their pluses. All of this in a package that is integrated, easily expandable, modular, and real-world usable.
Feature specific, these are where I hope to take it in its current stage:
I have shown extensively in the section above, with the system drawings that I created, on the general flow of one system to another. Inputs/variables, determine the data that is used. Data is used to determine an outcome from a strategy instance, this is the closest to forecasting. Over many many variable changes, these ‘predictions’ at a successful strategy can hopefully be just as good as forecasting out discreet data. Backtesting is linked to most aspects, as it is central to how a fit method is determined. Artificial intelligence is used in the evolutionary algorithm that pars down the variety of methods to discover the fittest via what is basically trial and error.