Class GainsFromTrading

  extended byExamples.Trading.GainsFromTrading

public class GainsFromTrading
extends java.lang.Object

We compute and graph the following statistics associated with a trading strategy as functions of the asset drift mu:

during the life of the strategy. These functions are valuated at drifts mu evenly spaced between extreme values mu_min=-0.3 (bear merket) and mu_max=0.3 (bull market). The graphs of the functions are charted for the following trading strategies (define in the package TradingStrategies):

The volatility is fixed at sigma=0.4, fixed transaction costs at 10, proportional transaction costs at 0.25. Initial number of shares bought 100. Time horizon T is one year. 10,000 paths of the underlying asset are simulated.

The average down and double or nothing strategies buy on each 7 percent price decline from the level of the last buy. The double or nothing strategy then doubles the number of shares held.

The return on investment is computed under the assumption that the investor has an infinite cash pile with which to sustain the strategy. In particular no interest is paid on borrowings. The gains from trading are then viewed as interest paid on the maximum amount sunk into the strategy during its lifetime.

By default the doubleOrNothing strategy is not shown. Increase the variable nSeries to 4 (source code) if you want it.

Console program, no user interaction, all parameters fixed in source code.

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 GainsFromTrading()
Method Detail


public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,