pythonpyalgotrade

How can I get the yesterday's adjusted closing price in a data in pyalgotrade dataseries?


I want to compare today's closing price to yesterday's closing price, however I could not find a method to get yesterday's price. I also looked for shifting the closingPrice dataseries(which I received by getAdjCloseDataSeries()) but could not solve my problem. How can I get yesterday's price?

Documentation:

http://gbeced.github.io/pyalgotrade/docs/v0.20/html/dataseries.html

Solution

  • Try getAdjCloseDataSeries()[-1]