Skip to content
Snippets Groups Projects
Commit d8a31b98 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Fix bug in osr where moments were not based on optimal parameter draw

M_.params is global and was set by csminwel1 to the last value tested; this does not necessarily coincide with the optimal parameter vector, which may have occurred earlier. This commit explicitly sets the optimal parameter vector.
(cherry picked from commit 66901616)

Conflicts:
	matlab/osr1.m
parent 7b798b65
No related branches found
No related tags found
1 merge request!794Cherry-pick 4.4
...@@ -88,6 +88,8 @@ end ...@@ -88,6 +88,8 @@ end
inv_order_var(i_var),weights(i_var,i_var)); inv_order_var(i_var),weights(i_var,i_var));
oo_.osr.objective_function = f; oo_.osr.objective_function = f;
M_.params(i_params)=p; %make sure optimal parameters are set (and not the last draw used in csminwel)
% options = optimset('fminunc'); % options = optimset('fminunc');
% options = optimset('display','iter'); % options = optimset('display','iter');
% [p,f]=fminunc(@osr_obj,t0,options,i_params,... % [p,f]=fminunc(@osr_obj,t0,options,i_params,...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment