⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 montedati.m

📁 计算VaR的
💻 M
字号:
function [mvar] = montedati(DX,DR,valuta,legame,cambi,fattori,prezzi,vm,t,p,rendimento,lambda,modello,l)%MONTEDATI	montevar estimation changing the numbers of data.%%	[mvar] = montedati(DX,DR,valuta,legame,cambi,vm,t,p,rendimento,correlazione,lambda,modello,l) %   calculates Monte Carlo VaR reducing the number of data utilized to the%   minimum value of 150. Lambda is the weight in EWMA volatility forecast.%%	All data must be in columns.%%	See MONTEVAR%%	Copyright (c) 2004 by Flavio Bazzana%   Department of Computer and Management Sciences%   University of Trento%   38100 - Trento ITALY%   flavio.bazzana@economia.unitn.it[delta,dev,cor,C] = semplicecorr(DX,DR,legame);n = size(DX,1)+1;for i=1:n-150	if lambda==1			[deltap,dev,cor,C] = semplicecorr(DX(i:n,:),DR(i:n,:),legame);		else		[deltap,dev,cor,C] = ewmacorr(DX(i:n,:),DR(i:n,:),legame,lambda);	end	mvar(i) = montevar(delta,C,legame,valuta,cambi,fattori,prezzi,vm,t,p,modello,l,rendimento);endd=1:n-150;plot(d,mvar,'b')title('Monte Carlo VaR')xlabel('number of days eliminated')ylabel('VaR')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -