Skip to main content
No. of Recommendations: 7
kimardenmiller:
Ideas as to what might be going wrong?

Only just now seeing this thread, and having no way to reproduce what was happening, I have no idea. Did you check whether Yahoo! itself had data beyond 20190802?

But a bigger problem than what was most likely a temporary Yahoo! glitch is that your "trade if" condition is probably doing the opposite of what you think it's doing. I assume your intention is for the backtest to trade on the first market day of each month, but instead, it is trading on every market day except the first market day of each month. Your trade condition is this:

if(linear(1,month(0),-1,month(1))!=1,1,0) = 1

I think you must have meant this:

if(linear(1,month(0),-1,month(1))!=0,1,0) = 1

If so, then even better would be this:

notequal(month(0),month(1)) = 1

Better yet would be to create a field label

TradeSig: notequal(month(0),month(1))

and use "TradeSig = 1" as your trade condition so that you can easily confirm that it's behaving as expected by downloading the daily signal values.

Robbie Geary
Print the post  

Announcements

What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.