Stochasta::Portfolio::Optimizer
Constructors
Instance methods
covariance_matrix
Sourceexpected_returns
Sourcemax_sharpe_weights(risk_free_rate : Float64 = 0.0, iterations : Int32 = 100, swarm_size : Int32 = 40) : Array(Float64)
Finds the weights that maximize the Sharpe Ratio Constraints: long-only (weights >= 0), sum of weights = 1.0
Finds the weights that minimize the portfolio variance Constraints: long-only (weights >= 0), sum of weights = 1.0
n_assets
SourceNormalizes a raw weight vector to sum to 1.0
Computes the expected return of a portfolio given its weights