I need to compare the closing price with the moving average. Is there a factor similar to SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=10), but providing just the closing price.
I need to compare the closing price with the moving average. Is there a factor similar to SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=10), but providing just the closing price.
You're just retrieving the last close price in this case, so I don't know if there would be any parameters. If you search the API reference page for '.latest' you might find something that you're looking for though?
You could also create your own CustomFactor with your own parameters, if for example you wanted to get the close price from 3 days ago.