MATLAB代做  | MATLAB代寫  | MATLAB有償編程
首 頁
當前位置:MATLAB代做|MATLAB代寫|MATLAB有償編程matlab源碼參考源碼matlab方面
基于matlab編程金融風險量化分析源碼程序        [↓跳到下載地址]
官方主頁:源碼共享網站:www.kggbzb.tw

聯系方式:客服QQ:1747812398 買代碼源碼軟件站,歡迎咨詢

運行環境:Win9X/2000/XP/2003/

源碼語言:簡體中文

源碼類型:源碼程序 - 參考源碼 - matlab方面

推薦星級:

更新時間:2016-04-05 22:37:15

源碼簡介

%% Compute Value at Risk for a given portfolio
% This script computes the Value at Risk for a portfolio using 3 different
% techniques, historical simulation, parametric, and Monte Carlo
% simulation. 

%% Import data from Excel


%% Convert price series to return series and visualize historical returns
% This step illustrates converting a price series to a return series using
% the function TICK2RET from the Financial Toolbox.  This function allows
% for calculating simple or logarithmic returns (continuous). 
%
% THIS SECTION REQUIRES THE FOLLOWING MATHWORKS PRODUCTS AND THEIR
% RESPECTIVE DEPENDENCIES:
% * Financial Toolbox

clear variables
load USStockPrices

%% Visualize price series
% Normalize prices starting at $1
normPrices = ret2tick(tick2ret(HistPrices));

% Visualize normPrices from Workspace window
mypick = strcmpi(Tickers, 'GOOG') | strcmpi(Tickers, 'IBM') ...
    | strcmpi(Tickers, 'AAPL');
mypickStockPrices = HistPrices(:, mypick);
mypickNormPrices = normPrices(:, mypick);
mypickTickers = Tickers(mypick);
plot(mypickNormPrices,'DisplayName','mypickNormPrices','YDataSource','mypickNormPrices');figure(gcf)
legend(mypickTickers)

normIndexPrice = ret2tick(tick2ret(pricesIndex));
hold all
plot(normIndexPrice,'DisplayName','Index','YDataSource','normIndexPrice');figure(gcf)

%% Explain simple and logarithmic returns
AAPL = mypickStockPrices(1:11,1); % Take first 11-day prices of AAPL
retSimple = tick2ret(AAPL);
retLog = tick2ret(AAPL, [], 'Continuous');
[retLog retSimple]
[retLog log(1+retSimple)]
[exp(retLog)-1 retSimple]
[sum(retLog) prod(1+retSimple)-1] %#ok<*NOPTS>
[exp(sum(retLog))-1, prod(1+retSimple)-1]

%% Simple data analysis, mean, std, correlation, beta
mypickRet = tick2ret(mypickStockPrices, [], 'Continuous');
mean(mypickRet)
std(mypickRet)
% Max drawdown
maxdrawdown(mypickStockPrices)  % From Financial Toolboxes
% Correlation
corrcoef(mypickRet)

% Simple beta calculation
IndexRet = tick2ret(pricesIndex);
AAPLRet = tick2ret(mypickStockPrices(:,1));

% Auto-generate figure
createfigure([mypickNormPrices, normIndexPrice], IndexRet, AAPLRet, ...
    [], [0 0 1])

%% Calculate return from price series
returnsSecurity = tick2ret(HistPrices,[],'Continuous');
totalReturns = sum(returnsSecurity);
numDays = size(HistPrices, 1);

% The heatmap makes use of MATLAB's graphics capabilities.  For more
% information edit the M-file "makeHeatmap.m"
makeHeatmap(totalReturns(end, :), Tickers, numDays, 'returns', 'matlab');

% [EOF]


提 示:本站所有源碼只提供瀏覽,需要定制的朋友可以聯系在線客服!
注意:價格根據項目的難易程度來定價格業務咨詢

基于matlab編程金融風險量化分析源碼程序 --下載地址

注意:為避免不必要的誤會,本站項目里的源碼只公開部分需要的聯系在線客服

本站長期招聘程序代寫高手,歡迎加入華南地區matlab團隊

想創業卻沒有經驗的人

無論你是否有過網上開店的經驗,都可以隨時聯系在線客服,建立自己獨立的網站
想開網店卻不知道如何入手

淘寶創業成本低而且風險小,如果想開淘寶店的朋友可以聯系在線客服。
想兼職創業,卻不擅長交際與服務的人

在家創業月入5000元。網站程序+百套群發工具+網賺資料+域名+空間+本站終身代理資格,這樣你網賺的條件全具備了。每天3小時管理、推廣、收錢。
缺乏能快速贏利型產品的人

導入多種最新流行營銷軟件+網賺教程,讓入駐者輕松加盟、復制有效成交技巧、快速賺錢。

源碼評論評論內容只代表網友觀點,與本站立場無關!

   評論摘要(共 0 條,得分 0 分,平均 0 分) 查看完整評論

瀏覽說明

* 本站所有源碼全部公開,隨時隨地瀏覽!
* MATLAB軟件如用于商業用途,請購買正版!
* 如果您發現下載鏈接錯誤,請點擊報告錯誤謝謝!
* 站內提供的所有軟件包含破解及注冊碼均是由網上搜集,若侵犯了你的版權利益,敬請來信通知我們!
Copyright © 2008-2014 www.kggbzb.tw. All Rights Reserved.
頁面執行時間:250.00000 毫秒
安微25选5开奖号