%% Direct Setting of PortfolioMAD Object Properties
% Although not recommended, you can set properties directly, however no error-checking is done on your inputs.

m = [ 0.05; 0.1; 0.12; 0.18 ];
C = [ 0.0064 0.00408 0.00192 0; 
    0.00408 0.0289 0.0204 0.0119;
    0.00192 0.0204 0.0576 0.0336;
    0 0.0119 0.0336 0.1225 ];
m = m/12;
C = C/12;

AssetScenarios = mvnrnd(m, C, 20000);

p = PortfolioMAD;

p = setScenarios(p, AssetScenarios);

p.LowerBudget = 1;
p.UpperBudget = 1;
p.LowerBound = zeros(size(m));
disp(p);

% Scenarios cannot be assigned directly to a PortfolioMAD object. Scenarios must always be set through either the PortfolioMAD function, the setScenarios function, or any of the scenario simulation functions.
% Copyright 2015 The MathWorks, Inc.