Hi, I've been searching for a while and didn't get a good answer for what I'm going through. I'm not very familiar with the details, which I'm trying to improve rapidly.
I have turned on the
coo function here and am trying to keep records of every day's closing prices and daily portfolio value with
Aftering printing out everything, this is what happens it seems:
- it creates an order when a strategy signals it to
- it executes the order created the day before using the closing price from the previous day
- the portfolio value seems to be lagged. Say my cost base is 100 at day 1, the trade is executed on day 2. Closing price on day 2 is 99, but the portfolio value remains at 100.
- Only on day 3, the portfolio value shows up as 99.
- Is it possible to create and execute trades on the same day?
- If a trade does have to execute on two separate days Is it possibly to use the open price of the next day?
- Is it possible to align those portfolio values so that the changes in portfolio value happens on the same day as the changes in closing prices, as opposed to the following day?