net.sourceforge.jasa.agent.valuation
Class ChartistForecaster

java.lang.Object
  extended by net.sourceforge.jasa.agent.valuation.AbstractReturnForecaster
      extended by net.sourceforge.jasa.agent.valuation.ReturnForecasterWithTimeHorizon
          extended by net.sourceforge.jasa.agent.valuation.ChartistForecaster
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ReturnForecaster

public class ChartistForecaster
extends ReturnForecasterWithTimeHorizon
implements java.io.Serializable

See Also:
Serialized Form
 

Field Summary
protected  TimeSeriesWindow history
           
protected  int sampleInterval
           
protected  AbstractContinousDistribution windowSizeDistribution
           
 
Fields inherited from class net.sourceforge.jasa.agent.valuation.ReturnForecasterWithTimeHorizon
alpha, currentPrediction, historicalPredictions, historicalPrices, market, timeHorizon, totalSquaredError
 
Constructor Summary
ChartistForecaster()
           
ChartistForecaster(AbstractContinousDistribution windowSizeDistribution)
           
 
Method Summary
 double calculateHistoricalMeanReturn()
           
 void eventOccurred(SimEvent event)
           
 double getNextPeriodReturnForecast(Market market)
           
 int getSampleInterval()
           
 AbstractContinousDistribution getWindowSizeDistribution()
           
 void initialiseWindowSize()
           
 void onRoundClosedEvent(RoundFinishedEvent event)
           
 void onSimulationStarting(SimulationStartingEvent event)
           
 void setSampleInterval(int sampleInterval)
           
 void setWindowSize(int windowSize)
           
 void setWindowSizeDistribution(AbstractContinousDistribution windowSizeDistribution)
           
 void subscribeToEvents(EventScheduler scheduler)
           
 void updatePriceHistory(RoundFinishedEvent event)
           
 
Methods inherited from class net.sourceforge.jasa.agent.valuation.ReturnForecasterWithTimeHorizon
afterPropertiesSet, clone, dispose, getAlpha, getForecastError, getReturnForecast, getTimeHorizon, onRoundFinished, setAlpha, setTimeHorizon
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

history

protected TimeSeriesWindow history

windowSizeDistribution

protected AbstractContinousDistribution windowSizeDistribution

sampleInterval

protected int sampleInterval
Constructor Detail

ChartistForecaster

public ChartistForecaster(AbstractContinousDistribution windowSizeDistribution)

ChartistForecaster

public ChartistForecaster()
Method Detail

getNextPeriodReturnForecast

public double getNextPeriodReturnForecast(Market market)
Specified by:
getNextPeriodReturnForecast in class ReturnForecasterWithTimeHorizon

calculateHistoricalMeanReturn

public double calculateHistoricalMeanReturn()

updatePriceHistory

public void updatePriceHistory(RoundFinishedEvent event)

eventOccurred

public void eventOccurred(SimEvent event)
Overrides:
eventOccurred in class ReturnForecasterWithTimeHorizon

onSimulationStarting

public void onSimulationStarting(SimulationStartingEvent event)
Overrides:
onSimulationStarting in class ReturnForecasterWithTimeHorizon

onRoundClosedEvent

public void onRoundClosedEvent(RoundFinishedEvent event)

initialiseWindowSize

public void initialiseWindowSize()

subscribeToEvents

public void subscribeToEvents(EventScheduler scheduler)
Overrides:
subscribeToEvents in class ReturnForecasterWithTimeHorizon

getWindowSizeDistribution

public AbstractContinousDistribution getWindowSizeDistribution()

setWindowSizeDistribution

public void setWindowSizeDistribution(AbstractContinousDistribution windowSizeDistribution)

getSampleInterval

public int getSampleInterval()

setSampleInterval

public void setSampleInterval(int sampleInterval)

setWindowSize

public void setWindowSize(int windowSize)