[R-SIG-Finance] Quick and simple Simulation of amultivariatereturns

Matthieu Stigler stigler3 at etu.unige.ch
Tue Feb 19 00:13:10 CET 2008


Hello Mama

I'm not sure I understood well what you need but if you want to have 
residual bootstrap or simulation of a simple VAR model, I added such 
function today in the repo of the package tsDyn.

The function TVAR_simul allows you to make a raw residual bootstrap with 
given data (or instead of resampling, generating new residuals of same 
variance), or simulate data with given parameter matrix and residual 
variance. Block sized bootstrap could be included, I think it is not too 
difficult, just find out how to resample with block for a usual sequence.

The function is not available on the current version of the package but 
if you are on Linux (sorry for Windows, I don't know) you just need:

svn checkout http://tsdyn.googlecode.com/svn/trunk/ tsdyn-read-only
cd tsdyn
sudo R CMD INSTALL tsDyn


Note that the function may contain errors! I hope not, but...

Best regards

Matthieu




Attiglah, Mama a écrit :
> Thanks David, I will certainly have a thorough look at it and may probably get back to you tomorrow. 
>
> Once again, thanks. 
> Mama 
> -----
> Mama Attiglah, PhD
> Quantitative Research Analyst
> Advanced Research Center
> State Street Bank
> +44(0)20 7698 6290 (Direct Line)
> +44 (0)207 004 2968 (Direct Fax)
> Please visit our Web site at 
> www.ssga.com
>
> -----Original Message-----
> From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Lüthi David (luda)
> Sent: 18 February 2008 15:21
> To: R-SIG-Finance
> Subject: Re: [R-SIG-Finance] Quick and simple Simulation of amultivariatereturns
>
> Hi Mama
>
> You can use the package 'ghyp' to fit a multivariate generalized hyperbolic distribution (or a (symmetric) special case) to your data and sample from that distribution afterwards like
>
> library(ghyp)
> data(smi.stocks)
> fit.mv <- fit.ghypmv(smi.stocks)
> sim.data <- rghyp(10000, fit.mv)
>
>
> Best regards
> David
>
> --
> David Lüthi
> idp - Institute of Data Analysis and Process Design
> Zurich University of Applied Sciences
> Postfach 805
> CH-8401 Winterthur
>
> E-mail: david.luethi at zhaw.ch
> Phone: 058 934 78 03
> http://www.idp.zhaw.ch 
> --
>
>
> -----Ursprüngliche Nachricht-----
> Von: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] Im Auftrag von Attiglah, Mama
> Gesendet: Montag, 18. Februar 2008 13:30
> An: R-SIG-Finance
> Betreff: [R-SIG-Finance] Quick and simple Simulation of a multivariatereturns
>
>
> Hi room, 
> Just want to find out if we do have any package in R that simulates a multivariate data using historical values. What about the simulation but with a long term views on some metrics, i.e. Mean, Volatility, correlation, etc... Example, I have a 2 years time series of the returns on 5 asset classes and I want to project the future returns just on a simulation basis. (It needs not preserve necessarily their time dependency distribution). Any model or any Monte Carlo methods or bootstrapping should do, including a simple block or row re-sampling with repetition. 
> Please reply on the basic of a multivariate historical data. This is not a portfolio simulation but a simulation of the portfolio constituents. 
> Any information is highly appreciated.
> Thanks 
> -----
> Mama Attiglah, PhD
> Quantitative Research Analyst
> Advanced Research Center
> State Street Bank
> +44(0)20 7698 6290 (Direct Line)
> +44 (0)207 004 2968 (Direct Fax)
> Please visit our Web site at 
> www.ssga.com
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. 
> -- If you want to post, subscribe first.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. 
> -- If you want to post, subscribe first.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. 
> -- If you want to post, subscribe first.
>
>



More information about the R-SIG-Finance mailing list