Class DoubleOrNothing

  extended byExamples.Trading.DoubleOrNothing

public class DoubleOrNothing
extends java.lang.Object

Console program allocating a constant volatility asset and examining the strategy which averages down as follows: 100 shares are bought at time t=0. Each time the asset price declines 5% from the level of the last buy the position (number of shares) is increased by a factor f=2. Computes the means and standard deviations of:

All except the last quantity are discounted amounts and all are evaluated at the time horizon T. Parameters (time to expiration, volatility,...) fixed in source code. No user interaction. 10,000 paths of the underlying asset are simulated.

Warning:if f is large enough this can wrest positive returns even from an asset drifting lower (bear market). In this case however the position can grow very large. Do this only if you have very deep pockets!

Constructor Summary
Method Summary
static void main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DoubleOrNothing()
Method Detail


public static void main(java.lang.String[] args)