Back to Community
Interday data?

Hi,

It's been a long time since I've been on Quantopian, other stuff got in the way, but I'm finally back. Unfortunately, I have almost no experience with python (I mostly use matlab) and Quantopian, so this question may seem obvious or dumb to some of you (sorry in advance).

I'm trying to figure out if there is a way to pass data from a scheduled function that runs on Monday on to a function that runs later in the week. The application is that my code on Monday looks at my pipeline of stocks and sets a weighting and day to purchase based on various inputs. Then, on each day of purchase, the stocks specified for purchase on that day are purchased.

Is this possible?

Thanks,

Tane

3 responses

I guess what I may be asking is if context is reset every day or if the data in context is the same on Wednesday as it was on Monday (assuming nothing altered it in between).

context isn't reset, context.mondaysdata would still be the same later in the week, you can clone this simple algo and look at the logs it produces

Clone Algorithm
2
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5838e52ca838c562d4e237f1
There was a runtime error.

Thanks Dustin. That algo helped a lot.