examples/backtest/example_05_using_portfolio/README.md
A simple strategy demonstrating how to use Portfolio in NautilusTrader.
The Portfolio is a central component that tracks the state of your trading account. It connects directly to the broker to get real-time positions, balances, and P&L.
The strategy shows portfolio information at four key points:
To simulate these specific portfolio states, the strategy fires bracket order (a combination of an entry order with associated take-profit and stop-loss orders), allowing us to demonstrate the complete lifecycle of portfolio states.
Key differences between Portfolio and Cache:
Portfolio:
Cache:
For more information about Portfolio in NautilusTrader, see:
Portfolio class.