Hello Quants,
This is my most ambitious algorithm to date. Unfortunately, I believe I may have bitten off more than I can chew. In essence I have noticed certain algorithms that do well when a market is trending up, others when it is trending down, and I have pick up a few specific items that are generally useful to any algorithm. The one I have posted represents a collection of code taken from these other algorithms that when utilized together should be fairly robust. I prefer to predict stock performance using fundamental analysis, thus it is reflected in the algorithm. These modifications reflect my own personal preferences and hopefully will lead to an algo that could trade my own money. However, this algorithm produces a few errors I have not been able to correct. Firstly, the “#” have removed code on lines 102, 103 (identical code on 120, 121) that I would like to use. And secondly, I would like to remove “long_filter(context, data)” and replace it with the “long_trending(context, data)” on line 239 (I assume fixes for line 239 can be applied appropriately for line 240 because they apply to similar code in separate functions). I would be very appreciative if someone could take a gander at this and apply some fixes. Suggestions always welcome. I also would not mind working with others who have an interest in fundamental analysis.
Thank you for your time.