Examples.Trading
Class ReturnsHistogram

java.lang.Object
  extended byExamples.Trading.ReturnsHistogram

public class ReturnsHistogram
extends java.lang.Object

We compute (smoothed, normalized) histograms of the returns of the following two trading strategies:

defined in the package TradingStrategies. The average down strategy buys on each 7 percent price decline from the level of the last buy. Dollar cost averaging makes 5 buys.

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 return on investment is computed as a return on the maximum invested during the life of the strategy. The gains from trading are then viewed as interest paid on this maximum. Financing through "borrowing" from existing funds, no interest paid on borrowings.

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


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

Constructor Detail

ReturnsHistogram

public ReturnsHistogram()
Method Detail

main

public static void main(java.lang.String[] argv)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException