# Tag Info

0

Have you solved it yet? For example in the drift parameter, the dt needs to be vector of time from 0 to 1 by dt. My code is: GBM<-apply(BM,2,function(x) 100*exp((cumsum((r-0.5*sigma*sigma)*time)+sigma*x))) where I'm using GBM on already cumsummed Brownian Motion (x).

0

Have you look at copula package! Maybe you could get ideias from it https://www.jstatsoft.org/article/view/v021i04/v21i04.pdf http://finzi.psych.upenn.edu/R/library/copula/html/copula-package.html

1

Seems like you are running cumsum on a normalised vector - which'll give you zero as the end value for each path. Also, in the GBM, the drift term (-sigma^2*dT) needs to accumulate over time.

2

I've never used QuantStrat, but have used SIT for about two years. Michael's blog provides a great way to learn R, understand SIT, and learn about backtesting strategies. I've never found a mistake in his code, and that's how I made a living for 20+ years. It takes some real persistence to understand how to use it in depth, but you can easily set up tests by ...

0

I don't have perfect solution for above problem, I but can help you out with the alternative. As far as my information you can't download the data country wise. I was also looking for the same. You should have all the symbols first in place. I have prepared a small code which loop through the all available symbols and get historical data from Yahoo. library(...

0

You may want to take a look at this: https://www.youtube.com/watch?v=4CnowC3UH4s

0

I have found the mistake. The ugarchfit function sets automatically non negativity constraints for all coefficients- This makes sense since the alpha in our case shouldn't be negative. However, when releasing the constraint to negative values you get the right results. The only explanation I can think of is that in the course of optimisation, temporarily ...

Top 50 recent answers are included