Back

An Example of Fundamental Ranking

I've been looking a fundamental ranking methods like Piotroski's F-Score.  I put together a quick algorithm using Morningstar data to see how I might implement something like this in quantconnect.  Feel free to make comments.  I hope this is helpful.

Update Backtest








That's pretty exciting stuff, Paul. Thanks for sharing. One question: In your FineSelectionFunction there are several lines with the comment, "fix need last year". What does that mean?

0

Denny, Piatroski's F-Score has you compare the current year to the prior year's value. I couldn't find a way to get last year's value.  What I did was compare the last 3 months to the last twelve months.  I'm not sure I'm getting exactly what I want.  This just gives you an idea of how you can use the fundamental data.  It give you decent returns, but with a lot of volitility.  Also, it runs very slow in backtesting and can use too much ram.

0

Thanks for sharing, interesting stuff.

Indeed, universe selection algos on QC take a long time to backtest and this is no exception.

0

Thank for sharing - great work.

Has anyone else noticed when working with this algorithm that Securities.Count is ever increasing with each fine universe update? It seems to me that if the algorithm runs long enough it is fated to run slower and slower and eventually run out of memory.

I don't think this is a problem with Paul's code or algorithm, I think it may be unexpected behavior of the fine universe selection.

I have tried to manually fix by removing securities from the SecurityManager list that don't match those in the universe, but this seems less than satisfying. Does anybody have a better solution?
1

Thanks, this is a great contribution. I will be using this as a basis when I find time to experiment with fundametal data.

1

Great example thank you Paul,

Martin -- the securities are never removed from the collection - it is known, intentional behavior. They have a relatively small impact so it doesn't slow the algorithm down. It is done so at the end of the algorithm we can have proper accounting of the profit and loss on each position for the statistics.

We're pausing on major features for the next couple of months now that we've launched options and futures. We'll be focused on making the engine faster and fixing various bugs.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


That's a great strategy!
0

Hi Jared!

  are morningstar fundamentals available for live trading? 

If they are not, what is the expected release date?

Thanks in advance.

0

When I run backtest that start from 2017/01/01 , I will got following Memory Usage Maxed Out Exception, How could to solve this issue that if I expect do a long term backtest? Should I need to do more power with Quantconnect Subscriptions for RAM Upgrade ?

Runtime Error: System.Exception: Execution Security Error: Memory Usage Maxed Out - 12288MB max, with last sample of 13669MB.

at QuantConnect.Isolator.ExecuteWithTimeLimit (System.TimeSpan timeSpan, System.Func`1[TResult] withinCustomLimits, System.Action codeBlock, System.Int64 memoryCap) [0x002a0] in <88b912b0fd84484faf8b4c982c08e712>:0
at QuantConnect.Lean.Engine.Engine.Run (QuantConnect.Packets.AlgorithmNodePacket job, QuantConnect.Lean.Engine.AlgorithmManager manager, System.String assemblyPath) [0x0078d] in <2516aeb381a54c2a9787b534047df995>:0 (Open Stacktrace)

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed