[Quantproject-developers] QuantProject/b7_Scripts/TickerSelectionTesting EndOfDayTimerHandlerCTC.cs,
Brought to you by:
glauco_1
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8274/b7_Scripts/TickerSelectionTesting Modified Files: EndOfDayTimerHandlerCTC.cs EndOfDayTimerHandlerCTO.cs RunEfficientCTOPortfolio.cs RunEfficientPortfolio.cs Log Message: Updated files for the EfficientPortfolio script: minimal changes Index: EndOfDayTimerHandlerCTO.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/EndOfDayTimerHandlerCTO.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** EndOfDayTimerHandlerCTO.cs 26 Apr 2005 19:02:12 -0000 1.9 --- EndOfDayTimerHandlerCTO.cs 4 May 2005 18:30:54 -0000 1.10 *************** *** 146,168 **** DataTable tickersByPrice = selectorByOpenPrice.GetTableOfSelectedTickers(); */ ! /*SelectorByWinningOpenToClose selectorByWinningOpenToClose = ! new SelectorByWinningOpenToClose(this.tickerGroupID, false, currentDate, ! currentDate, this.numberOfEligibleTickers); ! DataTable winningOpenToCloseTickers = selectorByWinningOpenToClose.GetTableOfSelectedTickers(); ! */ SelectorByLiquidity mostLiquid = new SelectorByLiquidity(this.tickerGroupID, false, currentDate.AddDays(-this.numDaysForLiquidity), currentDate, this.numberOfEligibleTickers/2); ! SelectorByOpenToCloseVolatility lessVolatile = ! new SelectorByOpenToCloseVolatility(mostLiquid.GetTableOfSelectedTickers(), ! false, currentDate.AddDays(-this.numDaysForLiquidity), ! currentDate, ! this.numberOfEligibleTickers/4); ! this.eligibleTickers = lessVolatile.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedAtEachMarketDayFromMostLiquid = new SelectorByQuotationAtEachMarketDay( this.eligibleTickers, false, currentDate.AddDays(-this.numDaysForLiquidity), ! currentDate, this.numberOfEligibleTickers/4, this.benchmark); return quotedAtEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(); } --- 146,169 ---- DataTable tickersByPrice = selectorByOpenPrice.GetTableOfSelectedTickers(); */ ! SelectorByLiquidity mostLiquid = new SelectorByLiquidity(this.tickerGroupID, false, currentDate.AddDays(-this.numDaysForLiquidity), currentDate, this.numberOfEligibleTickers/2); ! //SelectorByOpenToCloseVolatility lessVolatile = ! // new SelectorByOpenToCloseVolatility(mostLiquid.GetTableOfSelectedTickers(), ! // true, currentDate.AddDays(-this.numDaysForLiquidity/3), ! // currentDate, ! // this.numberOfEligibleTickers/4); ! this.eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedAtEachMarketDayFromMostLiquid = new SelectorByQuotationAtEachMarketDay( this.eligibleTickers, false, currentDate.AddDays(-this.numDaysForLiquidity), ! currentDate, this.numberOfEligibleTickers/2, this.benchmark); ! //SelectorByWinningOpenToClose winners = ! // new SelectorByWinningOpenToClose(quotedAtEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(), ! // false, currentDate.AddDays(-2), ! // currentDate, this.numberOfEligibleTickers/4); ! //return winners.GetTableOfSelectedTickers(); return quotedAtEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(); } Index: RunEfficientPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientPortfolio.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RunEfficientPortfolio.cs 26 Apr 2005 19:02:14 -0000 1.5 --- RunEfficientPortfolio.cs 4 May 2005 18:30:54 -0000 1.6 *************** *** 53,57 **** public class RunEfficientPorfolio { ! public static double MaxNumberOfHoursForScript = 10; //if MaxNumberOfHoursForScript has elapsed and the script //is still running, it will be stopped. --- 53,57 ---- public class RunEfficientPorfolio { ! public static double MaxNumberOfHoursForScript = 6; //if MaxNumberOfHoursForScript has elapsed and the script //is still running, it will be stopped. *************** *** 129,132 **** --- 129,133 ---- this.endOfDayTimer = new IndexBasedEndOfDayTimer( this.startDateTime, this.benchmark ); + } *************** *** 206,209 **** --- 207,211 ---- this.checkDateForReport); + //in inherited classes'override method: //add here TimerHandler's handlers to timer's events //example Index: EndOfDayTimerHandlerCTC.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/EndOfDayTimerHandlerCTC.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EndOfDayTimerHandlerCTC.cs 26 Apr 2005 19:02:11 -0000 1.5 --- EndOfDayTimerHandlerCTC.cs 4 May 2005 18:30:54 -0000 1.6 *************** *** 70,79 **** { SelectorByLiquidity mostLiquid = new SelectorByLiquidity(this.tickerGroupID,false, ! currentDate.AddDays(-this.numDaysForLiquidity), currentDate, this.numberOfEligibleTickers); this.eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedInEachMarketDayFromMostLiquid = new SelectorByQuotationAtEachMarketDay(this.eligibleTickers, false, currentDate.AddDays(-this.numDaysForLiquidity),currentDate, ! this.numberOfEligibleTickers, this.benchmark); return quotedInEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(); } --- 70,81 ---- { SelectorByLiquidity mostLiquid = new SelectorByLiquidity(this.tickerGroupID,false, ! currentDate.AddDays(-this.numDaysForLiquidity), ! currentDate, ! this.numberOfEligibleTickers/2); this.eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedInEachMarketDayFromMostLiquid = new SelectorByQuotationAtEachMarketDay(this.eligibleTickers, false, currentDate.AddDays(-this.numDaysForLiquidity),currentDate, ! this.numberOfEligibleTickers/2, this.benchmark); return quotedInEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(); } *************** *** 150,154 **** { if(this.orders.Count == 0 && this.account.Transactions.Count == 0) ! this.account.AddCash(15000); this.marketCloseEventHandler_orderChosenTickers(); --- 152,156 ---- { if(this.orders.Count == 0 && this.account.Transactions.Count == 0) ! this.account.AddCash(17000); this.marketCloseEventHandler_orderChosenTickers(); Index: RunEfficientCTOPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientCTOPortfolio.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** RunEfficientCTOPortfolio.cs 11 Apr 2005 18:52:32 -0000 1.17 --- RunEfficientCTOPortfolio.cs 4 May 2005 18:30:54 -0000 1.18 *************** *** 99,103 **** this.targetReturn, this.portfolioType); ! } --- 99,103 ---- this.targetReturn, this.portfolioType); ! } |