Category: Finance


       iOS iPhone

Stock price / probability risk analyzer optimizer app for the common man. Now with portfolio support, pairwise correlation/regression analysis of daily returns, and portfolio optimization. Computes forward (price,probability) for your share-weighted portfolio.
Unlike other folio optimizers, this code does not assume normality of returns, nor does it require to you enter volatility estimates...these are computed from public historical return data, and you can tell it how far back to look to compute the volatility. Try some optimizations and compare to results from other codes!

See Whats New In This version notes (all versions) for many more details.

Why rely on the tea leaves of chart reading when you can apply real statistics and historical resampled data to your analysis? While charting tools such as Bollinger bands, moving averages, and candlesticks are generated only on historical data, this app takes past data and remixes it via Monte Carlo methods to generate thousands of possible future price walks, then computes the probabilities of those price outcomes. Also works for stock-like ETFs and short ETFs (e.g. SH = short SPY).

Estimates future price distribution using random walk theory, where random samples are chosen from the history of the stock in question.

User can control how far back in time to use historical data to capture only the current "epoch" or to take into account long term historical behavior.

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.

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 by adjusting the maximum number of days backwards to sample and/or a back in time linear weighting.

Stochastic Model Validation (backtest) 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 and all other estimated probability (risk) levels dynamically after the model run is completed.

Validate tab:

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 over time for all withheld points.

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.

What's new

Introduce a robust pairwise return correlation estimate in the Correl[ation] tab, shown
as a blue cyclic curve around the (1,1) return center.

This curve is computed as follows:

1. For every 1 degree of arc around on the 2-security plane, project all return
data points to a radial cutting plane passing thru (1,1). This plane represents a 2 security portfolio at that particular angle. At this time, the app itself only supports portfolios that are long in each security, but this correlation may show potential uses for short positions. In some cases, short positions may be realized by short ETFs of the underlying security.

2. Compute the standard deviation of returns on this cutting plane (e.g. this 2 security portfolio mix).

3. For all angles of the circle, plot the standard deviation using polar coordinates, where radius = stdev on the cut plane portfolio, and angle = given angle. For computation, we use an angle step of 1 degree, which seems sufficiently accurate for display purposes.

4. The major axis of the cyclic curve may be a better representation of the 2 security portfolio of maximum variance than the traditional least squares regression line.

5. The minor axis of the cyclic curve may be a better representation of the 2 security portfolio of minimum variance than the portfolio normal to the traditional regression line.

5a. Intrepid readers may note the resemblence to 2D elliptical distribution fitting methods, but this app is not quite there yet.

6. The "cyclic correlation" factor is computed as 1-major_axis_length/minor_axis_length. Note that these 2 major and minor axes lengths are in the common unit of standard deviation, and so the ratio is unitless (as is the traditional R correlation factor).

7. Note that in cases of low correlation, the blue cyclic curve is almost circular (e.g. major axis length ~= minor axis length). In this case, the cyiclic correlation is 1 - same/same = 1-1 = 0, matching the traditional linear correlation.

8. In the case of high correlation (check SPY vs. DIA for example), the major axis
is much larger than the minor axis, and so the cyclic correlation is 1-small/large = close to 1 (mimicing the linear correlation R).

9. Note that the major axis of this cyclic correlation curve may not be parallel to the traditional linear regression line, but nonetheless may be a better representation of the
correlation direction, at least by visual inspection. Seeing these cyclic correlations being different from traditional linear correlations may inspire you to further investigate how stock correlations are computed in your primary investment systems.


Screenshot 1 of 5

Share with Others

Last changed:
2 days ago
differential enterprises
0.7 MB

Current Version Average Rating:
No data

All Versions Average Rating:
No data
Other Apps By This Developer
Market Vector Auto Regression High CPU
NewsFlash! Photo Filter