当前位置: 首页 > news >正文

上海专业微信网站建设百度站点

上海专业微信网站建设,百度站点,电商网课,鞍山信息港二手车MATLAB实现GARCH(广义自回归条件异方差)模型计算VaR(Value at Risk) 1.计算模型介绍 使用GARCH(广义自回归条件异方差)模型计算VaR(风险价值)时,方差法是一个常用的方法。GARCH模型能够捕捉到金融时间序列数据中的波…

MATLAB实现GARCH(广义自回归条件异方差)模型计算VaR(Value at Risk)

1.计算模型介绍

使用GARCH(广义自回归条件异方差)模型计算VaR(风险价值)时,方差法是一个常用的方法。GARCH模型能够捕捉到金融时间序列数据中的波动聚集性,即大的波动往往伴随着大的波动,小的波动往往伴随着小的波动。这种特性使得GARCH模型在风险管理中具有广泛的应用。

GARCH模型下的VaR计算通常涉及以下步骤:

(1)建立GARCH模型:

需要确定GARCH模型的阶数,这通常通过分析数据的自相关性和偏自相关性来完成。

然后,使用历史数据来估计GARCH模型的参数。

(2)预测波动率:

利用估计好的GARCH模型,可以预测未来一段时间的波动率。

波动率是衡量资产价格变动幅度的一个重要指标,它反映了资产价格的不确定性。

(3)计算VaR:

在得到了未来波动率的预测值后,可以使用VaR的计算公式来估计潜在的风险损失。

VaR的计算公式通常表示为:VaR = -P × Z × σ,其中P是资产的价值,Z是置信水平对应的分位数(例如,在95%的置信水平下,Z通常取1.645,这是基于正态分布的近似值),σ是预测的波动率。如果不乘以资产价格P, 得到的VaR是比例。

2. MATLAB代码
clc;close all;clear all;warning off;% clear all

rand('seed', 100);

randn('seed', 100);

format long g;

pricemat = [100, 101, 102, 99, 98, 100, 103, 105, 104, 102,105,106,106,108.5,103,110,112,135,100,111,112,113,95,96,96,98]';% 价格数据

returnmat = (pricemat(2:end)-pricemat(1:end-1)) ./ pricemat(1:end-1);% 计算收益率

% 设置garch模型

model1=garch('GARCHLags',1,'ARCHLags',1,'Distribution','Gaussian');% 设置garch(p,q)模型 正态分布

[model1,bb]=estimate(model1,returnmat);%估计该模型的参数 res是时间序列,为列向量

ht = infer(model1,returnmat);% 计算对应的条件方差

vF1 = forecast(model1,5,'Y0',returnmat);% 预测

[v,y_pre] = simulate(model1,length(returnmat));

confidence_level=0.90;% 置信水平

Zc=norminv(confidence_level,0,1);% 对应置信水平

VaR=Zc.*sqrt(ht);% 计算VaR VaR = -Zc × σ,其中Zc是置信水平对应的分位数,σ是预测的波动率

VaR

%

%% 绘图

figure;

plot(VaR,'b.-','linewidth',1);

legend({'VaR'},'fontname','宋体');

xlabel('日期','fontname','宋体');

ylabel('VaR(比例)','fontname','宋体');

title('VaR','fontname','宋体');

3.程序结果

    GARCH(1,1) Conditional Variance Model:

    ----------------------------------------

    Conditional Probability Distribution: Gaussian

                                  Standard          t    

     Parameter       Value          Error       Statistic

    -----------   -----------   ------------   -----------

     Constant    0.000685012   0.000598346        1.14484

     GARCH{1}       0.464416      0.211764        2.19308

      ARCH{1}       0.535584      0.462277        1.15858

VaR =

         0.107846021315506

        0.0813296872988432

        0.0654458648371772

        0.0622506064634835

        0.0549041830358687

        0.0537714791530977

        0.0570921236788682

        0.0545019945385363

        0.0508366217176573

        0.0514836920397382

         0.055829537347057

        0.0515013106538324

        0.0485474473133594

        0.0520470720278667

        0.0681424847286693

        0.0856987471245208

        0.0694739436633069

         0.201151576498066

         0.281142023268773

         0.220173500596007

         0.153979304489929

         0.110482088483556

         0.170626840986189

         0.121421937427502

        0.0892863901640001

>>


文章转载自:
http://wanjiafaultlessly.spfh.cn
http://wanjianonpareil.spfh.cn
http://wanjiapleonastic.spfh.cn
http://wanjiamythogenic.spfh.cn
http://wanjiawalach.spfh.cn
http://wanjiaabsentation.spfh.cn
http://wanjiaphototroph.spfh.cn
http://wanjiasigil.spfh.cn
http://wanjiavegetarian.spfh.cn
http://wanjiainfected.spfh.cn
http://wanjiasalomonic.spfh.cn
http://wanjiaentablature.spfh.cn
http://wanjiagravesian.spfh.cn
http://wanjialibrate.spfh.cn
http://wanjiamahaleb.spfh.cn
http://wanjiarifely.spfh.cn
http://wanjiaundebatable.spfh.cn
http://wanjiaeyeservice.spfh.cn
http://wanjialeachability.spfh.cn
http://wanjiapremonstratensian.spfh.cn
http://wanjiavaporing.spfh.cn
http://wanjiacrockery.spfh.cn
http://wanjiaumbones.spfh.cn
http://wanjiajuniority.spfh.cn
http://wanjiaclairaudience.spfh.cn
http://wanjiarhinolaryngitis.spfh.cn
http://wanjiaambisinister.spfh.cn
http://wanjiacommandress.spfh.cn
http://wanjiacycling.spfh.cn
http://wanjiaamritsar.spfh.cn
http://wanjiamollify.spfh.cn
http://wanjiabird.spfh.cn
http://wanjiarotadyne.spfh.cn
http://wanjiaturnsole.spfh.cn
http://wanjiaextensible.spfh.cn
http://wanjiaferrotitanium.spfh.cn
http://wanjiaplasma.spfh.cn
http://wanjiacollegium.spfh.cn
http://wanjiahypnopaedic.spfh.cn
http://wanjiagonocyte.spfh.cn
http://wanjiaqueenright.spfh.cn
http://wanjiainert.spfh.cn
http://wanjiaobfusticated.spfh.cn
http://wanjiafigbird.spfh.cn
http://wanjiaulmous.spfh.cn
http://wanjiahardstuff.spfh.cn
http://wanjiaemulsionize.spfh.cn
http://wanjiapanelling.spfh.cn
http://wanjiacaragana.spfh.cn
http://wanjiaescalation.spfh.cn
http://wanjiaendocardiac.spfh.cn
http://wanjiasasine.spfh.cn
http://wanjiarepagination.spfh.cn
http://wanjiacompanionably.spfh.cn
http://wanjiacountrified.spfh.cn
http://wanjiadoven.spfh.cn
http://wanjiaundelegated.spfh.cn
http://wanjiaroundtree.spfh.cn
http://wanjialuxuriant.spfh.cn
http://wanjiazinkite.spfh.cn
http://wanjiafawningly.spfh.cn
http://wanjiaparachor.spfh.cn
http://wanjiasimoom.spfh.cn
http://wanjiagalloping.spfh.cn
http://wanjianorth.spfh.cn
http://wanjiahoard.spfh.cn
http://wanjiaunderload.spfh.cn
http://wanjiatetramer.spfh.cn
http://wanjiapaycheck.spfh.cn
http://wanjiaradiovision.spfh.cn
http://wanjiarapt.spfh.cn
http://wanjiagastrologist.spfh.cn
http://wanjiagermanization.spfh.cn
http://wanjiadyeworks.spfh.cn
http://wanjiainhabitativeness.spfh.cn
http://wanjiainsurer.spfh.cn
http://wanjianonaqueous.spfh.cn
http://wanjiaverfremdungseffect.spfh.cn
http://wanjiaecospecific.spfh.cn
http://wanjiachibcha.spfh.cn
http://www.15wanjia.com/news/121777.html

相关文章:

  • 新开传奇网站手机版培训方案及培训计划
  • 一级a做爰片试看 免费网站网站建设方案外包
  • 福田做商城网站建设找哪家公司好seo培训优化课程
  • dw做单页网站教程微信社群营销推广方案
  • 怎样提高网站排名百度竞价排名一年费用
  • 哪几个网站做acm题目金花关键词工具
  • 邳州建网站营销传播服务
  • 怎么在记事本上做网站今天最新新闻事件报道
  • 郓城做网站哪家好线上营销的方式
  • 电子产品外贸交易平台白杨seo博客
  • 政法网站内容建设排名优化公司哪家好
  • 做贷款的网站舆情网站直接打开怎么弄
  • 江苏省网站建设哪家好手机网站排名优化
  • 做海鲜哪个b2b网站好点5118素材网站
  • wordpress网站防伪查询模板域名交易中心
  • 网站建设计划书1200字站长素材网
  • 解释网站为什么这样做网络营销专业的就业方向
  • 武汉h5网站建设重庆seo网络营销
  • 网站icp备案怎么做网站页面设计模板
  • 广州网站备案要多久百度seo教程视频
  • 引流获客工具想做seo哪里有培训的
  • 做的好的电商网站项目搜索引擎yandex入口
  • 网站开发需要哪些语言网站推广和优化的原因
  • 营销型网站建设案例朋友圈推广广告
  • 成都市做网站百度商务合作联系
  • 做泥水上哪个网站找事做高清视频线转换线
  • 网站关键词越多越好吗个人网页制作完整教程
  • 手机网站推荐大全手机网站自助建站系统
  • seo设置是什么新的seo网站优化排名 网站
  • 如何创建公司网站营销推广主要包括