[Quantproject-developers] QuantProject/b7_Scripts/ArbitrageTesting/PairTrading/SimplePairTrading/InS
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2006-05-14 15:25:34
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/ArbitrageTesting/PairTrading/SimplePairTrading/InSample In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7517/PairTrading/SimplePairTrading/InSample Added Files: RunSimplePairTradingIS.cs OutputDisplayer.cs OptimizationOutput.cs GenomeRepresentation.cs EndOfDayTimerHandlerSimplePTIS.cs Log Message: Added SimplePairTrading strategy, based on arbitrage concepts --- NEW FILE: OutputDisplayer.cs --- /* QuantProject - Quantitative Finance Library OutputDisplayer.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Data; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading.InSample { /// <summary> /// Summary description for OutputDisplayer /// </summary> public class OutputDisplayer : System.Windows.Forms.Form { private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button buttonLoadFromFile; private System.Windows.Forms.DateTimePicker dtpLastDate; private System.Windows.Forms.DateTimePicker dtpFirstDate; private System.Windows.Forms.TextBox textBoxMaxNumOfStdDevForNormalGap; private System.Windows.Forms.DataGrid dgBestGenomes; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; // user code private ArrayList bestGenomes; private GenomeRepresentation lastSelectedGenomeRepresentation; private void outputDisplayer() { this.dgBestGenomes.DataSource = this.bestGenomes; DataGridTableStyle styleForGrid = new DataGridTableStyle(); styleForGrid.AllowSorting = true; this.dgBestGenomes.TableStyles.Add(styleForGrid); } public OutputDisplayer( DateTime firstDate , DateTime lastDate , ArrayList bestGenomes ) { if ( bestGenomes.Count == 0 ) throw new Exception( "bestGenomes is empty! It should contain " + "a genome, at least." ); // // Required for Windows Form Designer support // InitializeComponent(); // Marco code this.lastSelectedGenomeRepresentation = ((GenomeRepresentation)bestGenomes[0]); this.dtpFirstDate.Value = this.lastSelectedGenomeRepresentation.FirstOptimizationDate; this.dtpLastDate.Value = this.lastSelectedGenomeRepresentation.LastOptimizationDate; this.bestGenomes = bestGenomes; this.outputDisplayer(); } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.dgBestGenomes = new System.Windows.Forms.DataGrid(); this.textBoxMaxNumOfStdDevForNormalGap = new System.Windows.Forms.TextBox(); this.dtpFirstDate = new System.Windows.Forms.DateTimePicker(); this.dtpLastDate = new System.Windows.Forms.DateTimePicker(); this.buttonLoadFromFile = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.dgBestGenomes)).BeginInit(); this.SuspendLayout(); // // dgBestGenomes // this.dgBestGenomes.DataMember = ""; this.dgBestGenomes.Dock = System.Windows.Forms.DockStyle.Bottom; this.dgBestGenomes.HeaderForeColor = System.Drawing.SystemColors.ControlText; this.dgBestGenomes.Location = new System.Drawing.Point(0, 173); this.dgBestGenomes.Name = "dgBestGenomes"; this.dgBestGenomes.Size = new System.Drawing.Size(584, 200); this.dgBestGenomes.TabIndex = 0; this.dgBestGenomes.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dgBestGenomes_MouseUp); // // textBoxMaxNumOfStdDevForNormalGap // this.textBoxMaxNumOfStdDevForNormalGap.Location = new System.Drawing.Point(264, 88); this.textBoxMaxNumOfStdDevForNormalGap.Name = "textBoxMaxNumOfStdDevForNormalGap"; this.textBoxMaxNumOfStdDevForNormalGap.TabIndex = 5; this.textBoxMaxNumOfStdDevForNormalGap.Text = "1"; // // dtpFirstDate // this.dtpFirstDate.Location = new System.Drawing.Point(16, 48); this.dtpFirstDate.Name = "dtpFirstDate"; this.dtpFirstDate.TabIndex = 1; // // dtpLastDate // this.dtpLastDate.Location = new System.Drawing.Point(264, 48); this.dtpLastDate.Name = "dtpLastDate"; this.dtpLastDate.Size = new System.Drawing.Size(208, 20); this.dtpLastDate.TabIndex = 2; // // buttonLoadFromFile // this.buttonLoadFromFile.Location = new System.Drawing.Point(168, 8); this.buttonLoadFromFile.Name = "buttonLoadFromFile"; this.buttonLoadFromFile.Size = new System.Drawing.Size(136, 24); this.buttonLoadFromFile.TabIndex = 4; this.buttonLoadFromFile.Text = "Load genomes"; // // label1 // this.label1.Location = new System.Drawing.Point(32, 128); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(400, 32); this.label1.TabIndex = 3; this.label1.Text = "Left click data grid rows to reset dates to the optimization period. Right click " + "to preserve date displacements and backtest."; // // label2 // this.label2.Location = new System.Drawing.Point(16, 88); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(200, 23); this.label2.TabIndex = 6; this.label2.Text = "Max Num of StDev for normal Gap"; // // OutputDisplayer // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(584, 373); this.Controls.Add(this.label2); this.Controls.Add(this.textBoxMaxNumOfStdDevForNormalGap); this.Controls.Add(this.buttonLoadFromFile); this.Controls.Add(this.label1); this.Controls.Add(this.dtpLastDate); this.Controls.Add(this.dtpFirstDate); this.Controls.Add(this.dgBestGenomes); this.Name = "OutputDisplayer"; this.Text = "OutputDisplayer SimplePairTrading"; ((System.ComponentModel.ISupportInitialize)(this.dgBestGenomes)).EndInit(); this.ResumeLayout(false); } #endregion private bool aRowHasBeenClicked( object sender, System.Windows.Forms.MouseEventArgs e ) { DataGrid dataGrid = (DataGrid)sender; Point point = new Point( e.X , e.Y ); DataGrid.HitTestInfo hitTestInfo = dataGrid.HitTest( point ); return hitTestInfo.Row>=0; } private GenomeRepresentation dgBestGenomes_MouseUp_getClickedGenomeRepresentation( object sender, System.Windows.Forms.MouseEventArgs e ) { GenomeRepresentation genomeRepresentation = null; DataGrid dataGrid = (DataGrid)sender; Point point = new Point( e.X , e.Y ); DataGrid.HitTestInfo hitTestInfo = dataGrid.HitTest( point ); ArrayList bestGenomes = (ArrayList)dataGrid.DataSource; // DataRow dataRow = dataTable.Rows[ hitTestInfo.Row ]; if ( hitTestInfo.Row >= 0 ) // a grid row has been clicked, not the header genomeRepresentation = (GenomeRepresentation)bestGenomes[ hitTestInfo.Row ]; return genomeRepresentation; } private void dgBestGenomes_MouseUp_rightButton_updateDates( GenomeRepresentation newSelectedGenomeRepresentation ) { TimeSpan currentFirstDateDisplacement = ( this.dtpFirstDate.Value - this.lastSelectedGenomeRepresentation.FirstOptimizationDate ); TimeSpan currentLastDateDisplacement = ( this.dtpLastDate.Value - this.lastSelectedGenomeRepresentation.LastOptimizationDate ); this.dtpFirstDate.Value = newSelectedGenomeRepresentation.FirstOptimizationDate + currentFirstDateDisplacement; this.dtpLastDate.Value = newSelectedGenomeRepresentation.LastOptimizationDate + currentLastDateDisplacement; } private void dgBestGenomes_MouseUp_rightButton(object sender, System.Windows.Forms.MouseEventArgs e) { GenomeRepresentation genomeRepresentation = this.dgBestGenomes_MouseUp_getClickedGenomeRepresentation( sender , e ); dgBestGenomes_MouseUp_rightButton_updateDates( genomeRepresentation ); RunSimplePairTradingIS runSimplePairTradingIS = new RunSimplePairTradingIS(Convert.ToDouble(this.textBoxMaxNumOfStdDevForNormalGap.Text), genomeRepresentation.NumDaysForGap, genomeRepresentation.AverageGap, genomeRepresentation.StdDevGap, genomeRepresentation.FirstTicker, genomeRepresentation.SecondTicker, this.dtpFirstDate.Value , this.dtpLastDate.Value); runSimplePairTradingIS.Run(); this.lastSelectedGenomeRepresentation = genomeRepresentation; } private void dgBestGenomes_MouseUp_leftButton_updateDates( GenomeRepresentation newSelectedGenomeRepresentation ) { this.dtpFirstDate.Value = newSelectedGenomeRepresentation.FirstOptimizationDate; this.dtpLastDate.Value = newSelectedGenomeRepresentation.LastOptimizationDate; } private void dgBestGenomes_MouseUp_leftButton(object sender, System.Windows.Forms.MouseEventArgs e) { if ( aRowHasBeenClicked( sender , e ) ) // a grid row has been clicked, not the header { GenomeRepresentation newSelectedGenomeRepresentation = this.dgBestGenomes_MouseUp_getClickedGenomeRepresentation( sender , e ); dgBestGenomes_MouseUp_leftButton_updateDates( newSelectedGenomeRepresentation ); this.lastSelectedGenomeRepresentation = newSelectedGenomeRepresentation; } } private void dgBestGenomes_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { if ( e.Button == MouseButtons.Right ) this.dgBestGenomes_MouseUp_rightButton( sender , e ); if ( e.Button == MouseButtons.Left ) this.dgBestGenomes_MouseUp_leftButton( sender , e ); } } } --- NEW FILE: OptimizationOutput.cs --- /* QuantProject - Quantitative Finance Library OptimizationOutput.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Collections; namespace QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading.InSample { /// <summary> /// Data to be saved/load to/from disk, resulting from the /// optimization process. /// </summary> [Serializable] public class OptimizationOutput : ArrayList { // public ArrayList BestGenomes // { // get { return this.bestGenomes; } // } public OptimizationOutput() { } /// <summary> /// Adds a genome representation /// </summary> /// <param name="genomeRepresentation"></param> public void Add( GenomeRepresentation genomeRepresentation ) { base.Add( genomeRepresentation ); } } } --- NEW FILE: EndOfDayTimerHandlerSimplePTIS.cs --- /* QuantProject - Quantitative Finance Library EndOfDayTimerHandlerSimplePTIS.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Data; using System.Collections; using QuantProject.ADT; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Instruments; using QuantProject.Business.Financial.Ordering; using QuantProject.Business.Timing; using QuantProject.Business.DataProviders; using QuantProject.Data.DataProviders; using QuantProject.Data.Selectors; using QuantProject.Data.DataTables; using QuantProject.ADT.Optimizing.Genetic; using QuantProject.Scripts.TickerSelectionTesting.EfficientPortfolios; namespace QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading { /// <summary> /// Implements MarketOpenEventHandler, /// MarketCloseEventHandler and OneHourAfterMarketCloseEventHandler /// for the implementation of the simple pair trading strategy for /// two given tickers for a given time interval /// </summary> [Serializable] public class EndOfDayTimerHandlerSimplePTIS : EndOfDayTimerHandlerSimplePT { private int numDaysForGap; private double averageGap; private double stdDevGap; private void endOfDayTimeHandlerSimplePTIS_setChosenTickers(string firstTicker, string secondTicker, double averageGap, double stdDevGap) { for(int i = 0;i<this.averageGapsOfChosenTickers.Length;i++) { this.averageGapsOfChosenTickers[i] = averageGap; this.stdDevGapsOfChosenTickers[i] = stdDevGap; if(i%2 == 0) this.chosenTickers[i] = firstTicker; else this.chosenTickers[i] = secondTicker; } } public EndOfDayTimerHandlerSimplePTIS(double maxNumOfStdDevForNormalGap, int numDaysForGap, double averageGap, double stdDevGap, string firstTicker, string secondTicker, DateTime startDate, DateTime endDate, Account account) : base("",0,0,0,0, "^GSPC",startDate, endDate, maxNumOfStdDevForNormalGap, 0,0,0,0, account) { this.numDaysForGap = numDaysForGap; this.averageGap = averageGap; this.stdDevGap = stdDevGap; this.minimumGainForClosingPositions = 0.002; this.maximumToleratedLoss = 0.02; this.endOfDayTimeHandlerSimplePTIS_setChosenTickers(firstTicker, secondTicker, averageGap, stdDevGap); } /// <summary> /// Handles a "Market close" event. /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> public override void MarketCloseEventHandler( Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs ) { if(((IndexBasedEndOfDayTimer)sender).GetPreviousDateTime() != endOfDayTimingEventArgs.EndOfDayDateTime.DateTime) //it is not the first date fired by the timer, so the // gap can be computed base.MarketCloseEventHandler(sender, endOfDayTimingEventArgs); } /// <summary> /// Handles a "One hour after market close" event. /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> public override void OneHourAfterMarketCloseEventHandler( Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs ) { } } } --- NEW FILE: GenomeRepresentation.cs --- /* QuantProject - Quantitative Finance Library GenomeRepresentation.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using QuantProject.ADT.Optimizing.Genetic; using QuantProject.Business.Financial.Ordering; using QuantProject.Scripts.TickerSelectionTesting.EfficientPortfolios; using QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading; namespace QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading.InSample { /// <summary> /// Provides the genome relevant informations /// </summary> [Serializable] public class GenomeRepresentation { private double fitness; private string firstTicker; private string secondTicker; private DateTime firstOptimizationDate; private DateTime lastOptimizationDate; private int numDaysForGap; private double averageGap; private double stdDevGap; private double maxNumOfStdDevForNormalGap; private int generationCounter; public string FirstTicker { get{return this.firstTicker;} } public string SecondTicker { get{return this.secondTicker;} } public double Fitness { get { return this.fitness; } } public DateTime FirstOptimizationDate { get { return this.firstOptimizationDate; } } public DateTime LastOptimizationDate { get { return this.lastOptimizationDate; } } /// <summary> /// Number of the first generation containing the genome /// </summary> public int GenerationCounter { get { return this.generationCounter; } } public int NumDaysForGap { get { return this.numDaysForGap; } } public double AverageGap { get { return this.averageGap; } } public double StdDevGap { get { return this.stdDevGap; } } public double MaxNumOfStdDevForNormalGap { get { return this.maxNumOfStdDevForNormalGap; } } private void genomeRepresentation( double maxNumOfStdDevForNormalGap, Genome genome , DateTime firstOptimizationDate , DateTime lastOptimizationDate , int generationCounter ) { this.maxNumOfStdDevForNormalGap = maxNumOfStdDevForNormalGap; this.fitness = genome.Fitness; this.averageGap = ((GenomeMeaningSimplePT)genome.Meaning).AverageGap; this.stdDevGap = ((GenomeMeaningSimplePT)genome.Meaning).StdDevGap; this.firstTicker = ((GenomeMeaningSimplePT)genome.Meaning).FirstTicker; this.secondTicker = ((GenomeMeaningSimplePT)genome.Meaning).SecondTicker; this.numDaysForGap = ((GenomeMeaningSimplePT)genome.Meaning).NumOfDaysForGap; this.firstOptimizationDate = firstOptimizationDate; this.lastOptimizationDate = lastOptimizationDate; this.generationCounter = generationCounter; } public GenomeRepresentation( double maxNumOfStdDevForNormalGap, Genome genome , DateTime firstOptimizationDate , DateTime lastOptimizationDate ) { this.genomeRepresentation( maxNumOfStdDevForNormalGap, genome , firstOptimizationDate , lastOptimizationDate , -1 ); } public GenomeRepresentation( double maxNumOfStdDevForNormalGap, Genome genome , DateTime firstOptimizationDate , DateTime lastOptimizationDate , int generationCounter ) { this.genomeRepresentation( maxNumOfStdDevForNormalGap, genome , firstOptimizationDate , lastOptimizationDate , generationCounter ); } } } --- NEW FILE: RunSimplePairTradingIS.cs --- /* QuantProject - Quantitative Finance Library RunSimplePairTradingIS.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using QuantProject.ADT.FileManaging; using QuantProject.Data.DataProviders; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.Timing; using QuantProject.Business.Financial.Accounting.Commissions; using QuantProject.Business.Financial.Ordering; using QuantProject.Business.DataProviders; using QuantProject.Presentation.Reporting.WindowsForm; using QuantProject.Scripts.TickerSelectionTesting.EfficientPortfolios; using QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading; namespace QuantProject.Scripts.ArbitrageTesting.PairTrading.SimplePairTrading.InSample { /// <summary> /// Script to test the pair trading strategy for /// two tickers for a given time period /// </summary> [Serializable] public class RunSimplePairTradingIS { private double maxNumOfStdDevForNormalGap; private int numDaysForGap; private double averageGap; private double stdDevGap; private EndOfDayTimerHandlerSimplePT endOfDayTimerHandler; private string firstTicker; private string secondTicker; private DateTime startDateTime; private DateTime endDateTime; private IHistoricalQuoteProvider historicalQuoteProvider; private Account account; private IEndOfDayTimer endOfDayTimer; private string benchmark; private string scriptName; public RunSimplePairTradingIS(double maxNumOfStdDevForNormalGap, int numDaysForGap, double averageGap, double stdDevGap, string firstTicker, string secondTicker, DateTime startDate, DateTime endDate) { this.maxNumOfStdDevForNormalGap = maxNumOfStdDevForNormalGap; this.numDaysForGap = numDaysForGap; this.averageGap = averageGap; this.stdDevGap = stdDevGap; this.firstTicker = firstTicker; this.secondTicker = secondTicker; this.startDateTime = startDate; this.endDateTime = endDate; this.benchmark = "^GSPC"; this.scriptName = "SimplePairTradingForGivenTickers"; } #region Run private void run_initializeEndOfDayTimer() { //default endOfDayTimer this.endOfDayTimer = new IndexBasedEndOfDayTimer( new EndOfDayDateTime(this.startDateTime, EndOfDaySpecificTime.MarketOpen), this.benchmark ); } protected void run_initializeAccount() { //default account with no commissions and no slippage calculation this.account = new Account( this.scriptName , this.endOfDayTimer , new HistoricalEndOfDayDataStreamer( this.endOfDayTimer , this.historicalQuoteProvider ) , new HistoricalEndOfDayOrderExecutor( this.endOfDayTimer , this.historicalQuoteProvider )); } private void run_initializeHistoricalQuoteProvider() { this.historicalQuoteProvider = new HistoricalAdjustedQuoteProvider(); } private void checkDateForReport(Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs) { if(endOfDayTimingEventArgs.EndOfDayDateTime.DateTime>=this.endDateTime) //last date is reached by the timer this.showReport(); } private void showReport() { AccountReport accountReport = this.account.CreateReport(this.scriptName, 1, this.endOfDayTimer.GetCurrentTime(), this.benchmark, new HistoricalAdjustedQuoteProvider()); Report report = new Report(accountReport); report.Show(); this.endOfDayTimer.Stop(); } private void run_initialize() { run_initializeHistoricalQuoteProvider(); run_initializeEndOfDayTimer(); run_initializeAccount(); run_initializeEndOfDayTimerHandler(); } public void Run() { this.run_initialize(); this.run_addEventHandlers(); this.endOfDayTimer.Start(); } private void run_initializeEndOfDayTimerHandler() { this.endOfDayTimerHandler = new EndOfDayTimerHandlerSimplePTIS(this.maxNumOfStdDevForNormalGap, this.numDaysForGap, this.averageGap, this.stdDevGap, this.firstTicker, this.secondTicker, this.startDateTime, this.endDateTime, this.account); } private void run_addEventHandlers() { this.endOfDayTimer.MarketOpen += new MarketOpenEventHandler( this.endOfDayTimerHandler.MarketOpenEventHandler); this.endOfDayTimer.MarketClose += new MarketCloseEventHandler( this.endOfDayTimerHandler.MarketCloseEventHandler); this.endOfDayTimer.MarketClose += new MarketCloseEventHandler( this.checkDateForReport); this.endOfDayTimer.OneHourAfterMarketClose += new OneHourAfterMarketCloseEventHandler( this.endOfDayTimerHandler.OneHourAfterMarketCloseEventHandler ); } #endregion } } |