How can I treat a aleatory variable in Matlab?

2 visualizaciones (últimos 30 días)
Mattia Michael  Margoni Bastian
Mattia Michael Margoni Bastian el 26 de Sept. de 2017
Respondida: Niraj Gadakari el 28 de Sept. de 2017
I have the following basic optimal reinsurance model
min(x+ P(min(max(L-x,0),VaR-x))
subject to 0<=x<=VaR
where P(.) is a function that calculates the premium (a so called premium principle), L is a random number (a vector of values), VaR is a scalar and x is the priority of a limited stop-loss reinsurance (the variable I am looking for, a scalar). Now, I wish to apply the expected value premium principle, which is defined as:
P(X)=(1+omega)*mean(X)
where omega is the safety loading ( a scalar) and X is a random variable.
So, if I apply this premium principle to the optimization problem I come up with:
min(x+(1+omega)*mean(min(max(L-x,0),VaR-x))
subject to 0<=x<=VaR
How can I implement the random variable in Matlab?
My idea was the following:
e = random('gamma',45,8,1,1000); % random distribution
L=sort(e); % sort the distribution to find VaR, a quantile
VaR=quantile(L,0.995);
omega=0.3;
D=zeros(1,20000);
for j=1:20000
ob=@(x)(x+(1+omega)*(mean(min(max(datasample(e,1)-x,0),VaR-x))));
d_star=fminbnd(ob,0,VaR);
D(j)=d_star;
end
Priority=mean(D);
Is this simulation reasonable? Or are there other possibilities?
Thank you.

Respuestas (1)

Niraj Gadakari
Niraj Gadakari el 28 de Sept. de 2017
I believe you can use the random function to implement a random variable in MATLAB.

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by