|
WU Trading Library 0.2.0
A backtesting and trading strategy library
|
A basic portfolio implementation that supports multiple assets. More...
#include <portfolios.h>
Data Fields | |
| struct WU_Portfolio_ | base |
| double | cash |
| int | num_assets |
| WU_TimeStamp | last_update_time |
| WU_PortfolioParams | params |
| WU_PositionVector ** | positions |
| WU_PortfolioStats | stats |
| WU_Signal * | pending_orders |
A basic portfolio implementation that supports multiple assets.
It tracks cash, positions for each asset, and calculates portfolio value and PnL based on the current market prices and the positions held. It also keeps track of accumulated transaction costs and trading statistics. The portfolio is initialized with a set of parameters and an array of asset symbols, and it dynamically manages the positions for each asset.
Definition at line 112 of file portfolios.h.
| struct WU_Portfolio_ WU_BasicPortfolio::base |
Definition at line 113 of file portfolios.h.
| double WU_BasicPortfolio::cash |
Definition at line 114 of file portfolios.h.
| WU_TimeStamp WU_BasicPortfolio::last_update_time |
Definition at line 116 of file portfolios.h.
| int WU_BasicPortfolio::num_assets |
Definition at line 115 of file portfolios.h.
| WU_PortfolioParams WU_BasicPortfolio::params |
Definition at line 117 of file portfolios.h.
| WU_Signal* WU_BasicPortfolio::pending_orders |
Definition at line 120 of file portfolios.h.
| WU_PositionVector** WU_BasicPortfolio::positions |
Definition at line 118 of file portfolios.h.
| WU_PortfolioStats WU_BasicPortfolio::stats |
Definition at line 119 of file portfolios.h.