|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.mytrendtimer.trendtimer.Model
public class Model
This is a implementation of the financial model.
| Field Summary | |
|---|---|
static int |
MEDIUM_TERM_STAT_NBR_QUOTES
Number of quotes to take into account the do the medium term statistic |
static java.lang.String |
OUT_STRENGTH_LOG_FILE_PATH
The path (relative to baseDir !) |
static int |
SHORT_TERM_STAT_NBR_QUOTES
Number of quotes to take into account the do the short term statistic |
| Constructor Summary | |
|---|---|
Model(MyTrendTimer myTTArg,
OutFileWritter xmlResultFileObjArg,
boolean csvOutputGenerationArg,
OutFileWritter CSVFileObjArg,
java.util.ArrayList<Line> lineArrayArg,
int osc1DaysArg,
int osc2DaysArg,
int maxDayGapWarnNameArg,
int maxDailyPercQuoteChangeWarnNameArg,
java.text.DecimalFormat dfVarNbrDigitsNoAposArg,
java.text.DecimalFormat dfVarNbrDigitsArg,
QuoteSourceFile quoteSourceFileObjArg,
SAX2Handler xmlHandlerObjArg,
int startChartYearArg)
This is the constructor for the Model object. |
|
| Method Summary | |
|---|---|
void |
accumulateResults(long elapsedTimeMillisArg)
Accumulate result summary in a buffer |
void |
accumulateStrength()
Accumulate signal strength in a buffer and dump it into a file |
void |
calcAllStats()
Calc and Write all the stats statShortTerm, statMediumTerm, statCurrentYear, statPreviousYear |
void |
calcAndWriteStatCurrentYear(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
int daysInPreviousYearToStatArg,
int daysInCurrentYearToStatArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg,
java.text.DecimalFormat d0Arg)
Calc some stats on the last quotes (currentYear). |
void |
calcAndWriteStatMediumTerm(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg)
Calc some stats on the last quotes (medium term). |
void |
calcAndWriteStatPrevYear(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
int daysInPreviousYearToStatArg,
int daysInCurrentYearToStatArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg,
java.text.DecimalFormat d0Arg)
Calc some stats on the last quotes (previousYear). |
void |
calcAndWriteStatShortTerm(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg)
Calc some stats on the last quotes (short term). |
void |
calcResult()
Summarize the produced operations (return calculation, overperformance etc..) |
void |
checkCurrentSituation()
Check the current situation (values of the last calculation) |
void |
closeTradeXmlElement()
Just write the close of the |
void |
createLastFakeOp()
Produce a fake operation (based on current quote) to have the result of the last signal |
void |
loopInLines()
Loop in the previously instanciated line objects |
void |
loopMonthlyPerfObj()
Loop in PeriodicPerf objects (monthlyPerfObj) and write them in xml file. |
void |
loopMonthlyPerfObjSeasonal()
Loop in PeriodicPerf objects (monthlyPerfObj), calculate a monthly consolidated perf (seasonal) and write them in xml file. |
void |
loopYearlyPerfObj()
Loop in PeriodicPerf objects (yearlyPerfObj) and write them in xml file. |
void |
openTradeXmlElement()
Just write the open of the |
void |
writeAllToFile(long elapsedTimeMillisArg)
Call the methods to write full result set in xml file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MEDIUM_TERM_STAT_NBR_QUOTES
public static final java.lang.String OUT_STRENGTH_LOG_FILE_PATH
public static final int SHORT_TERM_STAT_NBR_QUOTES
| Constructor Detail |
|---|
public Model(MyTrendTimer myTTArg,
OutFileWritter xmlResultFileObjArg,
boolean csvOutputGenerationArg,
OutFileWritter CSVFileObjArg,
java.util.ArrayList<Line> lineArrayArg,
int osc1DaysArg,
int osc2DaysArg,
int maxDayGapWarnNameArg,
int maxDailyPercQuoteChangeWarnNameArg,
java.text.DecimalFormat dfVarNbrDigitsNoAposArg,
java.text.DecimalFormat dfVarNbrDigitsArg,
QuoteSourceFile quoteSourceFileObjArg,
SAX2Handler xmlHandlerObjArg,
int startChartYearArg)
throws java.lang.Exception
myTTArg - object to keep the warnings.xmlResultFileObjArg - The result file (already initialized at this stage)csvOutputGenerationArg - Already setted by a checkerCSVFileObjArg - The csv file (already initialized at this stage)lineArrayArg - The line objects to run the model onosc1DaysArg - Already setted by a checkerosc2DaysArg - Already setted by a checkermaxDayGapWarnNameArg - Found in the xml filemaxDailyPercQuoteChangeWarnNameArg - Found in the xml filedfVarNbrDigitsNoAposArg - Already setted by a method createOutputFormatterdfVarNbrDigitsArg - Already setted by a method createOutputFormatterquoteSourceFileObjArg - Already settedxmlHandlerObjArg - Already settedstartChartYearArg - Already setted by the checker call in the MTT main class
java.lang.Exception| Method Detail |
|---|
public void accumulateResults(long elapsedTimeMillisArg)
throws java.lang.Exception
java.lang.Exception
public void accumulateStrength()
throws java.lang.Exception
java.lang.Exception
public void calcAllStats()
throws java.lang.Exception
java.lang.Exception
public void calcAndWriteStatCurrentYear(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
int daysInPreviousYearToStatArg,
int daysInCurrentYearToStatArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg,
java.text.DecimalFormat d0Arg)
throws java.lang.Exception
xmlResultFileObjArg - the file where to writexmlElementArg - the xmlElementArgdaysInPreviousYearToStatArg - the number of days of the previous yeardaysInCurrentYearToStatArg - the number of days of the current yearlineObjArg - the lines objects to use for the statsdfVarNbrDigitsArg - the variable decimal formatd0Arg - the no digit (d0) decimal format
java.lang.Exception
public void calcAndWriteStatMediumTerm(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg)
throws java.lang.Exception
xmlResultFileObjArg - the file where to writexmlElementArg - the xmlElementArglineObjArg - the lines objects to use for the statsdfVarNbrDigitsArg - the variable decimal format
java.lang.Exception
public void calcAndWriteStatPrevYear(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
int daysInPreviousYearToStatArg,
int daysInCurrentYearToStatArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg,
java.text.DecimalFormat d0Arg)
throws java.lang.Exception
xmlResultFileObjArg - the file where to writexmlElementArg - the xmlElementArgdaysInPreviousYearToStatArg - the number of days of the previous yeardaysInCurrentYearToStatArg - the number of days of the current yearlineObjArg - the lines objects to use for the statsdfVarNbrDigitsArg - the variable decimal formatd0Arg - the no digit (d0) decimal format
java.lang.Exception
public void calcAndWriteStatShortTerm(OutFileWritter xmlResultFileObjArg,
java.lang.String xmlElementArg,
java.util.ArrayList<Line> lineObjArg,
java.text.DecimalFormat dfVarNbrDigitsArg)
throws java.lang.Exception
xmlResultFileObjArg - the file where to writexmlElementArg - the xmlElementArglineObjArg - the lines objects to use for the statsdfVarNbrDigitsArg - the variable decimal format
java.lang.Exception
public void calcResult()
throws java.lang.Exception
java.lang.Exception
public void checkCurrentSituation()
throws java.lang.Exception
java.lang.Exceptionpublic void closeTradeXmlElement()
public void createLastFakeOp()
throws java.lang.Exception
java.lang.Exception
public void loopInLines()
throws java.lang.Exception
java.lang.Exception
public void loopMonthlyPerfObj()
throws java.lang.Exception
java.lang.Exception
public void loopMonthlyPerfObjSeasonal()
throws java.lang.Exception
java.lang.Exception
public void loopYearlyPerfObj()
throws java.lang.Exception
java.lang.Exceptionpublic void openTradeXmlElement()
public void writeAllToFile(long elapsedTimeMillisArg)
throws java.lang.Exception
java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||