Fundamental Factor Based Stock Selection Strategy

This is a stock selection strategy based on fundamental factors. I tested more than 15 factors available on Quantconnect by using my factor significance testing algorithm and chose 3 of them (PE ratio, PriceChange1M, BookValuePerShare). 

The in-sample factor tesing period is from January 2005 to January 2012. The out of sample backtesting period is from 2012 to 2014. The strategy outperformed the market during the backtesting period.

Update Backtest

Hi, first let me say awesome work and thanks for sharing.

What I like about this:

  • Beta near 0
  • Factors tested individually

What I'm somewhat suspicious about:

  • Performance midway in test period is below benchmark
  • Tested on in-sample 2008-2009, you will see it's impacted by financial crisis as much as benchmark

I'm not sure test period is long enough (especially due to above, but also because daily bars and few trades). I guess the intent is to reoptimize the system every two years? The performance if test period is extended past 2014-03 to present does seriously worse than benchmark.

I wouldn't trade this as-is (obviously, since it's optimized for 2012-2014), but it can serve as a framework for someone wishing to do this type of strategy with new factors optimized for present.

Edit: Bullet lists look a bit ugly when publishing post (while looking fine in edit mode) because there's too much space ahead of list and too little space after it...


Hi Petter, thanks for comment and yes, the factor selection model is intended to reoptimize every two or three years in order to find the new effective factors in the market. So I tested the factor using the history data from 2005 to 2012 and run the out-of-sample test in the following three years. 

There is plenty of room to optimize both the factor selection and trading algorithm, like increasing the number of portfolios(I divided the coarse selection stock pool into 7 portfolios in this backtest result), expanding the coarse selection stock numbers (here I just chose 200 stock with the higherst dollar volume).  In addition, I only tested 17 factors for morning star fundamental data since the factor test is time consuming. After minming more effective factors which are not correlated, the strategy can be further improved. I think the factor selection algorithm do help me pick the significant factors in stock selection strategy.


sorry , what wrong when I clone the stratery to do the backtest, I got these error:

Runtime Error: Python.Runtime.ConversionException: could not convert Python result to System.Object[]
at Python.Runtime.Dispatcher.Dispatch (System.Collections.ArrayList args) [0x00018] in <59c711440fed482b8e57b026917e4706>:0
at __System_Func`2\[\[System_Collections_Generic_IEnumerable`1\[\[QuantConnect_Data_UniverseSelection_CoarseFundamental\, QuantConnect_Common\, Version=2_4_0_1\, Culture=neutral\, PublicKeyToken=null\]\]\, mscorlib\, Version=4_0_0_0\, Culture=neutral\, PublicKeyToken=b77a5c561934e089\]\,\[System_Object\[\]\, mscorlib\, Version=4_0_0_0\, Culture=neutral\, PublicKeyToken=b77a5c561934e089\]\]Dispatcher.Invoke (System.Collections.Generic.IEnumerable`1[T] ) [0x0000f] in <72d07064923f4ad68c41f80d8eb32654>:0
at QuantConnect.Algorithm.QCAlgorithm+<>c__DisplayClass266_0.b__0 (System.Collections.Generic.IEnumerable`1[T] c) [0x00000] in :0
at QuantConnect.Data.UniverseSelection.CoarseFundamentalUniverse.SelectSymbols (System.DateTime utcTime, QuantConnect.Data.UniverseSelection.BaseDataCollection data) [0x00012] in <4ccc32c0560b4a0e871b21869fef8e7b>:0
at QuantConnect.Data.UniverseSelection.SelectSymbolsUniverseDecorator.SelectSymbols (System.DateTime utcTime, QuantConnect.Data.UniverseSelection.BaseDataCollection data) [0x00001] in <4ccc32c0560b4a0e871b21869fef8e7b>:0
at QuantConnect.Lean.Engine.DataFeeds.UniverseSelection.ApplyUniverseSelection (QuantConnect.Data.UniverseSelection.Universe universe, System.DateTime dateTimeUtc, QuantConnect.Data.UniverseSelection.BaseDataCollection universeData) [0x0005f] in <06bf997a06c64cab8c008178e62be08f>:0
at QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.Sync (System.DateTime frontier, System.Collections.Generic.IEnumerable`1[T] subscriptions, NodaTime.DateTimeZone sliceTimeZone, QuantConnect.Securities.CashBook cashBook, System.DateTime& nextFrontier) [0x00325] in <06bf997a06c64cab8c008178e62be08f>:0
at QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed+d__31.MoveNext () [0x000d6] in <06bf997a06c64cab8c008178e62be08f>:0

Hi, this is an old post, we change the return value of universe selection to a Python list instead of a C# list to make it easier for Python users. Please see this thread for the updated algorithm <Fundamental Factor Long/Short  Strategy>

Update Backtest


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.


This discussion is closed