Stock price risk analyzer app for the common man.
Estimates future price distribution using random walk theory.
Background discussion: E. Fama article on early random walk studies from the 1960's:
New model calibration tutorial:
Example use case & training guide for studying "AAPL to $320" can be found at:
The app uses prior data from the stock in question for volatility estimates.
User can control how far back in time to use historical data to capture only the current "epoch" of a company or of the market as a whole if desired.
Built-in backtesting, verification, and model tuning tools.
-- Details --
This app models daily stock returns as a stable stochastic process and estimates a future price distribution by Monte Carlo re-sampling from an "empirical distribution" of a user-specified subset of prior (known) daily returns.
Be sure to press the Run Monte button on the Monte Carlo tab after changing settings or downloading a new data set. The MC is not run automatically after each change, because it can be a bit time consuming if you want the computation done for many days forward.
This app downloads historical data from Yahoo Finance as base data to resample. Prices are converted to daily returns [P(t)/P(t-1)] before resampling. The user can choose how far back to resample. By estimating a probability distribution of future prices at the user-specified investment horizon in this manner, we can give risk-of-loss estimates in thumb-rule fashion, to a first approximation.
Reports out estimated price and %loss estimates at the commonly used levels of 1st percentile and 5th percentile (1% and 5% risk). Also reports out median (50th percentile) price estimates at the given number of days forward. Calculations may be performed on Yahoo daily Closing or Adjusted daily Closing price data. An artificial shock filter is provided, which can be used to reject the resampling of prior returns that are artificially large (due to splits or other artificial re-valuations that do not affect the underlying value of the asset). Theory of operation is described in detail under the Theory tab.
The stochastic model may be tuned or calibrated only by adjusting the maximum number of days backwards to sample. One may want to tune the model differently for a different number of days forward estimate.
New Stochastic Model Validation features:
On the Monte Carlo tab, you can withhold any number of recent days from the model and then plot the results of the stochastic risk forecast as lower-bound envelopes at 1% and %5 estimated probability (risk) levels.
This allows you to perform an exhaustive validation on your model by withholding several points, computing the model, comparing the forward prediction of the model versus the actual reserved data, and repeating this in increasing time sequence for all withheld points.
New cursor beam on new plots:
A vertical "Cursor Beam" is provided that you can drag across the new plots in the Monte Carlo tab and the Validate tab to show the plotted values from several curves at once, with the values color-coded to the curves.
Show the full price probability plot linked to the days-forward setting of the Monte Carlo graph. This is a slice thru the probability surface generated by the Monte Carlo procedure.
Allow an optional display of 300 of the many monte carlo random walk traces as an overlay on the monte carlo tab's graphs.
The app provider makes no claims as to the suitability of this app for any purpose whatsoever, and the user should consult an investment advisor before making investment decisions.
In the Monte Carlo tab, add the probability density function dynamic plot which updates as you drag the cursor beams to select probability level and days forward. This is the same data from the monte carlo results as the cumulative distribution function (top yellow background graph), but in derivative form, so the user can get a better idea of the probabilities involved and the shape of the tails of the graph (the extremes).
The noisiness (jitter) of this new graph is due to the approximate and random nature of the monte carlo procedures. We don't see this jitter on the top cumulative probability graph because the integration operation which creates this top graph is essentially a filtering operation.
Note: the horizontal axis of this new probability graph is relative probability, not time. The vertical axis is price, as it is for the other curves.
The corresponding price/probability selection from the top graph is noted on this new bell-shaped curve by a small square dot. This dot is the only intersection that matters for this new graph; other intersections of the new graph (e.g. with the blue actual price data trace or any of the other curves) are meaningless, and are merely an artifact of overlaying 2 types of graphs (price=f(time) and price=f(probability)) on one set of axes.
A light gray horizontal line indicator is also drawn on the bottom graph to better show the price level that the user has selected on the top graph.
Change Theory tab name to Theory/Help. Add button under Theory/Help tab for a Calibration case study / tutorial.
Share with Others
- Last changed:
- Jun 07, 2013
- differential enterprises
- Average Rating:
- 3.50 (4)
- 0.3 MB