Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Tag Info

7

Usually the formula for the sample variance of a stock is given by: $$Var(R_{i}) = E (R_t - E(R_t))^2$$ If you are using daily data to compute the variance then the second term: $E(R_t) \approx 0$, therefore you can drop it from the computation. Which yields: $$Var(R_{i}) \approx E (R_t)^2$$ ...

3

I do not have access to this book but I suppose the decomposition is the cholesky decomposition (if you use R, simply generate it with chol(cov(g)) where g is a matrix with forecasts. What the transformation is doing are essentially two steps: 1. You replace the forecasts g with the normalized forecasts g-E(g). This can be done by demeaning the matrix (R: ...

2

[Sorry, I'm new here and accidently posted this as an answer and its just meant as a comment responding to a question, but it does not let me delete answers to put it under comments. If I last long enough, I'm sure I'll figure out how to edit things.] PCA is an eigenvalue/eigenvector decomposition of the data frequently applied in risk management to look ...

2

The issue is how do you evaluate the success of your trades. If the P&L in your simulation is measured as C(t+1)-C(t) then your simulation is not completely realistic, because in real life by the time you compute the signal based on C(t), even if you do so quickly, the price C(t) will not be the current price and you will not be able to buy at that price....

2

This equation shows how you update your forecast. (In a word: recursively). At the close of business on day t, when the day's return $r_{1,t}$ becomes available, you take a weighted average of: The forecast you had made yesterday for today, $σ_{1,t|t-1}^2$. (Hopefully you wrote that number down yesterday and you still have the piece of paper on which you ...

1

There is this very good book on forecasting by Rob Hyndman and George Athanasopoulos. There you find very useful tips and R code. Have a look at the chapter on time series decomposition there you find relevant stuff about seasonal time series.

1

Without testing it is hard to know. I am assuming you are trying to predict volatility and not returns. Hansen and Lunde (2005) concluded that hardly anything beats a Garch(1,1) for a stock and an exchange rate. But this conclusion could be re markedly different for another assets. There is know way to tell a priori. You need to run the models out-of-sample ...

1

I was running into the same error until I realized I had some NAs in the series of returns I was trying to model/forecast. After removing NAs the code worked perfectly. I hope this will solve your problem

1

Dates Index 01.03.2017 100 01.04.2017 110 01.05.2017 115 01.06.2017 117 01.10.2017 116 01.01.2019 120 01.01.2020 121 I took the end points of the months, quarters, and years that you provided; Draw the dot plot with smooth lines in Excel; Right-click on this line and choose "add line trend"; Select "Polynomial" and choose degree "3"; Tick the ...

1

You can find it on http://www.forexfactory.com/. Click details on "Non-Farm Employment Change" and you will have consensus and actual data for last 15+ years.

1

A limitation of both papers is they focus on point estimates, i.e they compare $\sigma_{t}$ with $h_{t}$ in the loss functions of the SPA Tests. A possible suggestion to overcome it, is to use a loss function based on density forecast, in order to capture the whole forecast density distribution and not only a single point. This may have important ...

1

You need to assign each of the target variables to their own column and then train a model for each of your forecast horizons library(quantmod) symbol= getSymbols("AAPL",from="2010-03-01", auto.assign=F) close<-Cl(symbol) open<-Op(symbol) lc1<-lag(close) lc2<-lag(close,2) lc3<-lag(close,3) lo1<-lag(open) lo2<-lag(open,2) lo3<-lag(...

1

It is too much too text so I take screenshots and the link to Rob Hynman's blog entry: If you formulate the ARIMA model likes this: Then you get these long term forecasts:

1

There is probably nothing wrong with your code although I did not check it in Mathematica. Normally, Geometric Brownian motion is just a model. Here, you simulate lots of paths and then average over it. The first plot gives something like $$E(S_t) = S_0*\exp(\mu t)$$ with $S_0$ the initial stock price. However, because of the simulation, you do not get ...

1

I dont think neither of both ideas are to be very fertile in the present structures of banks or asset management firms. There are several factors that have influenced the birth of algo trading. 1) The development of computer processing capacity behyond human capabilities which provided the hability to process more information than any team would. This will ...

1

You are right - GARCH model models volatility. They write: " The GARCH [27] can be used to model changes in the variance of the errors as a function of time." What people often do is to fit an ARIMA model (that can be used to forecast a time series) and apply a GARCH model to the errors (which gives you a feeling for the forecast error). See Hyndman and ...

1

Obviously a perfect forecast for interest rates is a bit hard to come by, such a thing would make the inventor quite a tidy sum. Broadly, the task you're seeking to accomplish falls under the banner of yield curve modeling, and there is a very substantial body of research in this area, including several good books. There are some canonical examples of ...

1

You are probably computing autocorrelation in the prices. If you compute autocorrelation between the returns or log returns then you will not see the results you are getting. This is because: Tomorrow's price will always be influenced by lagged prices and the series will not look weak stationary if you plot it. The direct differencing doesn't help either ...

1

Check your calculations, gold prices are indeed auto-correlated. acf(diff(log(OilGold\$price_gold))) will yield no auto-correlation in gold log-returns.

Only top voted, non community-wiki answers of a minimum length are eligible