Portfolio situation
-
Dear all,
I have some problem, maybe I do some mistake.
At the end of simulation, I printed two values:print('Final Cash Value: %.2f' % cerebro.broker.getcash())
print('Final Account Value: %.2f' % cerebro.broker.getvalue())If I understood well
the getvalue returns the entire value of the account
the getcash returns the free cash not used to buy stocksI need to do a double check.
How can I print the portfolio situation in a table ?
The sum of portfolio and the cash value must be equal to the getvalue results?Thank you
A -
@Alessandro-Di-Piazza said in Portfolio situation:
How can I print the portfolio situation in a table ?
Go over the positions with
getposition(xxx)
where xxx is a data feed.The sum of portfolio and the cash value must be equal to the getvalue results?
Should be.