class xf::fintech::portfolio_optimisation¶
#include "xf_fintech_po.hpp"
Overview¶
This class implements the Portfolio Optimisation Model.
class portfolio_optimisation: public xf::fintech::OCLController
Inherited Members¶
Methods¶
run¶
int run ( float* prices, int num_prices, int num_assets, float riskFreeRate, float targetReturn, std::vector <float>& GMVPWeights, float* GMVPVariance, float* GMVPReturn, std::vector <float>& EffWeights, float* EffVariance, float* EffReturn, std::vector <float>& TanWeights, float* TanVariance, float* TanReturn, float* TanSharpe, std::vector <float>& EffTanWeights, float* EffTanVariance, float* EffTanReturn )
Calculate Weights, Expected Portfolio Return and Variance for Global Minimum Variance Portfolio, Tangency Portfolio, Efficient Portfolio and Efficient Portfolio with risky and risk free assets
Parameters:
| inputDataFile | filename of the file containing the asset prices |
| riskFreeRate | the risk free rate |
| targetReturn | the target return |
| GMVPWeights | the asset weights for the Global Minimum Variance Portfolio |
| GMVPVariance | the portfolio variance for the Global Minimum Variance Portfolio |
| GMVPReturn | the portfolio expected return for the Global Minimum Varaince Portfolio |
| EffWeights | the asset weights for the efficient portfolio with target return |
| EffVariance | the portfolio variance for the efficient portfolio with target return |
| EffReturn | the portfolio expected for the efficient portfolio with target return |
| TanWeights | the asset weights for the Tangency Portfolio with risk free rate |
| TanVariance | the portfolio variance for the Tangency Portfolio with risk free rate |
| TanReturn | the portfolio expected return for the Tangency Portfolio with risk free rate |
| TanSharpe | the Sharpe Ratio for the Tangency Portfolio with risk free rate |
| EffTanWeights | the asset weights for the Tangency Portfolio with risk free rate and target return |
| EffTanVariance | the portfolio variance for the Tangency Portfolio with risk free rate and target return |
| EffTanReturn | the portfolio expected return for the Tangency Portfolio with risk free rate and target return |