...
SMA_200 = fact.SimpleMovingAverage(inputs=[dat.USEquityPricing.close], window_length=200, mask=uni)
...
...
200_diff = ((SMA_200 - dat.USEquityPricing.close)/SMA_200)
When the algorithm is built (every once in a while I do this purely for the purpose of checking for syntax, run-time errors, etc.), it returns a syntax error on line 46 (which is the declaration of 200_diff
). I don't see why that poses an error, and I would guess that it has something to do with the data types the two consist of. Vaguely similar calculations, however, do not pose syntax errors. Ex.: is_small_cap = (3000000 <= dat.Fundamentals.market_cap.latest <= 2000000000)
does not present an error.
Hopefully, another set of eyes can figure out what's causing this, as I cannot. Thanks in advance.
I included the lines that would be the most helpful in solving this, but I can definitely respond with more if need be.