Hello everyone,
I'm trying to access the close price of the last two periods. For the last close price I used the ".latest" method, but I can't figure out how to obtain the close price of the day before that (for example, if the current day is friday, I want both thursday and wednesday close prices).
I tried with a custom factor, however I get this error for which I can't find a solution: "Term.getitem() expected a value of type Asset for argument 'key', but got int instead."
Am I missing something? Can someone help me?
Thank you very much in advance,
D