Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
personal:portfolio:portopt [2015/09/10 15:19]
antonello [Compilation (not needed if using a pre-compiled version)]
personal:portfolio:portopt [2018/06/18 15:11] (current)
Line 21: Line 21:
 In portfolio theory agents attempts to maximise portfolio expected return for a given amount of portfolio risk, or equivalently to minimise risk for a given level of expected return. In portfolio theory agents attempts to maximise portfolio expected return for a given amount of portfolio risk, or equivalently to minimise risk for a given level of expected return.
  
-{{ :​personal:​portfolio:​portfolio_graph.png?nolink |Theoretical framework}}+{{ :​personal:​portfolio:​portfolio_model.png?nolink |Theoretical framework}}
  
 The portfolio management can be portrayed graphically as in the above Figure, where the feasible set of variance-profitability combinations in enclosed by the blue curve and the B-D segment represents the efficient frontier, where no variance can be lowered at productivity'​s price or equivalently no productivity can be increased at price of increasing variance. The portfolio management can be portrayed graphically as in the above Figure, where the feasible set of variance-profitability combinations in enclosed by the blue curve and the B-D segment represents the efficient frontier, where no variance can be lowered at productivity'​s price or equivalently no productivity can be increased at price of increasing variance.
Line 91: Line 91:
  
 ===== Usage ===== ===== Usage =====
 +
 +:!: Please notice that the API changed from version 1.1, with the introduction of the ''​port_opt_mean''​ and ''​port_opt_var''​ parameters (both by reference). For the old 1.1 call instructions see [[https://​lobianco.org/​antonello/​personal:​portfolio:​portopt?​rev=1441891152|here]].
 +
 +
 == Linux == == Linux ==
   ./portopt [options]   ./portopt [options]
Line 101: Line 105:
  
 Call: Call:
-  double solveport (const vector< vector <​double>​ > &VAR, const vector<​double>​ &MEANS, const double &alpha, vector<​double>​ &x_h, int &​errorcode,​ string &​errormessage,​ const double tollerance = 0.000001)+  double solveport (const vector< vector <​double>​ > &VAR, const vector<​double>​ &MEANS, const double &alpha, vector<​double>​ &x_h, int &​errorcode,​ string &​errormessage, double &​port_opt_mean,​ double &​port_opt_var, const double tollerance = 0.000001)
   ​   ​
 == As a lib using Python: == == As a lib using Python: ==
Line 110: Line 114:
   errorcode ​   = results[2]   errorcode ​   = results[2]
   errormessage = results[3]   errormessage = results[3]
 +  opt_mean ​    = results[4]
 +  opt_var ​     = results[5]
  
 === Options === === Options ===
 <​code>​ <​code>​
-  -h  --help ​                                   Prints this help +  -h  --help ​                                  ​Prints this help 
   -v  --var-file [input_var_file_name] ​        Input file containing the variance/​covariance matrix (relative path)      -v  --var-file [input_var_file_name] ​        Input file containing the variance/​covariance matrix (relative path)   
   -m  --means-file [input_means_file_name] ​    Input file containing the means vector (relative path)  ​   -m  --means-file [input_means_file_name] ​    Input file containing the means vector (relative path)  ​
Line 141: Line 147:
 You should have received a copy of the GNU Lesser General Public License along with PortOpt. ​ If not, see [[http://​www.gnu.org/​licenses]]. You should have received a copy of the GNU Lesser General Public License along with PortOpt. ​ If not, see [[http://​www.gnu.org/​licenses]].
  
 +
 +===== Citations =====
 +If you use this program or a derivative of it in an academic framework, please cite it!\\
 +Please cite as:
 +  * A. Dragicevic, A. Lobianco, ​ A. Leblois (2016), "​[[http://​dx.doi.org/​10.1016/​j.forpol.2015.12.010|Forest planning and productivity-risk trade-off through the Markowitz mean-variance model]]",​ Forest Policy and Economics, Volume 64, March 2016, Pages 25–34.
  
 ===== Acknowledgements ===== ===== Acknowledgements =====
personal/portfolio/portopt.1441891152.txt.gz · Last modified: 2018/06/18 15:10 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0