Hello,
I have attempted to run the code from the URL below. I have included the code from the URL only.
I seem unable to get this to run.I updated the CBOE Equity Put and Call Ratio to https://cdn.cboe.com/resources/options/volume_and_call_put_ratios/equitypcarchive.csv as the old one was not working.
I also commented out i.MarketCap = float(i.EarningReports.BasicAverageShares.ThreeMonths * (i.EarningReports.BasicEPS.TwelveMonths*i.ValuationRatios.PERatio)), as the MarketCap field of the FineFundamental object is read only, but I still can't seem to get it to work.
Any ideas?
Thank you!
from: https://www.quantconnect.com/tutorials/strategy-library/sentiment-and-style-rotation-effect-in-stocks
Shile Wen
Hi Thunder Chicken,
In the code, the lines after for i in fine should not be indented. In addition, there is an unnecessary indent in the except clause. I've shown the fixes in the attached backtest.
Best,
Shile Wen
Thunder Chicken
Shile,
Confused. I ran this again and it appears to have the same issues. If you compare the results of the original link to what you have provided, you will see they are drastically different.
https://www.quantconnect.com/tutorials/strategy-library/sentiment-and-style-rotation-effect-in-stocksOriginal article above. Much different results.
Shile Wen
Hi Thunder Chicken,
Because we no longer have access to the data from the original algorithm, it is difficult to tell why the results are different. Furthermore, the former calculation of Market Cap
i.MarketCap = float(i.EarningReports.BasicAverageShares.ThreeMonths * (i.EarningReports.BasicEPS.TwelveMonths*i.ValuationRatios.PERatio))
may not be correct all of the time. We will also review that algorithm because Universe Selection should return Universe.Unchanged, and not an empty list when the month hasn't changed.
Best,
Shile Wen
Thunder Chicken
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!