Sorry, that's probably quite a bunch of silly questions, but I just got lost a bit and need to dot all the i's and cross some t's :).
Let's say we have a series of returns (like this one we may get in R):
library(quantmod) getSymbols("AAPL") A <- AAPL[,6]["2007"]
Then, if I want to know how much could I lose with the probability 95%, I need to calculate VaR for this 5% quantile, OK? Again, in R first I need to calculate the quantile:
quantile(A, 0.05), am I right? The result in this particular series would be 11.485. Which means that with the 95% probability I won't go lower than 11.485, is that right? Thus, my VaR would be then mean(A) - 11.485 = 5.8 or 33.56%, wouldn't it?
In other words, calculating a quantile for a given probability in this particular case gives us a lower boundary corresponding to a series in question, doesn't it? And that's how quantiles are measured, it's not a percentage, but boundaries which with a certain probability limit values of a series?
Now, to the second part :)
While reading the article on Wolfram Alpha, I've noticed that among other things, when asked on a certain stock, WA among other information, also tries to give some predictions. Which are actually quantiles, aren't they? E.g., with the 95% probability they say that the stock in question in one month time won't go lower than 92.67 - and this price, 92.67 would be the 5% quantile for that particular stock during that particular period, right?
If so, now to the most interesting bit: as you may see, they also draw some hypothetical colored graphs there, using log normal random walks, as they say below. But with log normal random walks values one will get may be very different, is that so? Thus, they probably calculate quite a lot of such walks, like hundreds or thousands, and then bootstrap them? If so, then how is that done with R? What is the usual algorithm? Needful libraries? Where should I look to learn more?
Not that I'm interested in predicting stocks, of course :), but I just very much like the idea of trying to predict a distribution...