Need Developer Assistance Fixing a Resource Issue

I am developing a script that I'd like to do the following:

Script Idea:

Towards the end of the trading day, i would like to query all S&P stocks that:
a. dropped in price by at least 10%
b. have a price greater than 1.00
c. have a sales 1-year change of greater than 50%

from this query, we will choose 5 stocks.

throughout the next day, those 5 stocks will be sold once they hit a certain price target or liquidated at the end of the day.

At the end of the next day, the same process repeats itself.

The Problem:

I am constantly running into resource issues.

Per my support request, this was the tech's suggestion:

The issue with your code is that Coarse Fundamental is not filtering enough. Fine Fundamental receives about 5200 symbols and that is a lot of data to be read. I would advice you to found a condition to order the securities at coarse fundamental and only select the first 1000, 500, 200, etc members (for example, dollar volume). 

By the way, you have a Schedule Event for every minute that you don't need to, since you can move that logic to OnData (that is triggered every minute).


I'm hoping I can find someone in the community to help me finish up the script. My developer skills are extremely rusty, so I'd rather pay someone familiar with the system to give a hand. Any takers?

Update Backtest

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