全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
8900 7
2012-08-14
如何在MATLAB中对 计算我国股票市场1992 到2012的return的 VAR值和ES值  如何用图形来表示ES比VAR更能反映实际的损失。  我写的论文的主题就是 Expected shortfall 相比较于VAR 在中国股票市场上是更好的风险管理的办法! 离论文deadline只有10天了! 跪求!!!!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-10-5 23:20:45
你好,请问你解决论文问题没有,我也正在写相关的毕业论文,求教交流学习
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-11-14 10:11:05
不知道这个能不能满足


function calcvar

%calcvar        terminal interface for VaR calculation.
%
%        You can use the sample data (1, 2, 3) to try the program
%

%        Copyright (c) 2004 by Flavio Bazzana
%   Department of Computer and Management Sciences
%   University of Trento
%   38100 - Trento ITALY
%   flavio.bazzana@economia.unitn.it

clear
home

%        Load data ----------------------------------------------------------------------------------------

file=input('Which data? (1, 2, 3) ');
if file==1 load('dati1');
        elseif file==2 load('dati2');
        else load('dati3');
end
dati=size(X,1)

%        Type of return ------------------------------------------------------------------------

rendimento=input('Which return? (0 normal, 1 log) ');
[DX,DR,cambi,fattori,prezzi] = rendimenti(X,RF,RC,rendimento);

%        Decay factor ----------------------------------------------------------------------------

lambda=input('Decay factor? (x<=1) ');
if lambda==1
        [delta,dev,cor,C] = semplicecorr(DX,DR,legame);
        else [delta,dev,cor,C] = ewmacorr(DX,DR,legame,lambda);
end

%        Parameters ---------------------------------------------------------------------------------

t=input('Holding period? ');
p=input('Probability? ');

%        VaR method ------------------------------------------------------------------------------------

a=0;
while a < 4;
        a=input('VaR methods? (1 delta-normal, 2 historical simulation, 3 Monte Carlo, 4 average) ');
        if a==1
                [dvar,dvarp] = deltavar(delta,dev,cor,legame,valuta,cambi,vm,t,p);
                dvar
                elseif a==2
                        tipo=input('Mapping? (0 from risk factors, 1 from prices) ');
                        [svar] = simulvar(DR,RC,X,delta,valuta,legame,vm,t,p,tipo,rendimento)
                elseif a==3
                        modello=input('Simulation model? (0 linear, 1 log) ');
                        l=input('Number of simulations? ');
                        [mvar] = montevar(delta,C,legame,valuta,cambi,fattori,prezzi,vm,t,p,modello,l,rendimento)
        end
end

%        Average VaR --------------------------------------------------------------------------

dati=input('How many data for VaR calculation? ');
giorni=input('How many days of VaR calculation? ');
datidelta=input('Mapping calculation? (0 over all X, 1 over the data only) ');
a=0;
while a < 4;
        a=input('VaR methods? (1 delta-normal, 2 historical simulation, 3 Monte Carlo, 4 backtest) ');
        if a==1
                [dvar,media] = deltamedia(X,RF,RC,legame,valuta,vm,t,p,rendimento,dati,giorni,lambda,datidelta);
                media
                elseif a==2
                        tipo=input('Mapping? (0 from risk factors, 1 from prices) ');
                        [svar,media] = simulmedia(X,RF,RC,legame,valuta,vm,t,p,rendimento,dati,giorni,tipo,lambda,datidelta);
                        media
                elseif a==3
                        modello=input('Simulation model? (0 linear, 1 log) ');
                        l=input('Number of simulations? ');
                        [mvar,media] = montemedia(X,RF,RC,legame,valuta,vm,t,p,rendimento,dati,giorni,modello,l,lambda,datidelta);
                        media
        end
end

%        Daily backtest --------------------------------------------------------------------

campione=input('Number of test? (Basilea = 250) ');
dati=input('How many data for VaR calculation? ');
datidelta=input('Mapping calculation? (0 over all X, 1 over the data only) ');
a=0;
while a < 4;
        a=input('Backtest for? (1 delta-normal, 2 historical simulation, 3 Monte Carlo, 4 end) ');
        if a==1
                [dn,dvar,vp] = deltaback(X,RF,RC,legame,valuta,vm,p,rendimento,campione,dati,lambda,datidelta);
                elseif a==2
                        tipo=input('Type of estimation? (0 from risk factors, 1 from prices) ');
                        [sn,svar,vp] = simulback(X,RF,RC,legame,valuta,vm,p,rendimento,tipo,campione,dati,lambda,datidelta);
                elseif a==3
                        modello=input('Simulation model? (0 linear, 1 log) ');
                        l=input('Number of simulations? ');
                        [mn,mvar,vp] = monteback(X,RF,RC,legame,valuta,vm,p,rendimento,campione,dati,modello,l,lambda,datidelta);
        end
end
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-8-27 14:34:32
linzhang219 发表于 2012-11-14 10:11
不知道这个能不能满足
非常感谢,最近正在找这个程序
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-2-7 20:18:16
Expected+shortfall和VaR——互补或替代  http://www.doc88.com/p-9435491870574.html
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-3-2 11:14:48
linzhang219 发表于 2012-11-14 10:11
不知道这个能不能满足
您好!我最近在求论文中的VAR值,奈何matlab基础太烂了,找了好多资料都不知道如何去弄,能否请教下您啊!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群