[Quantproject-developers] QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOs
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2008-04-26 09:17:51
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/InSampleChoosers In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16154/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/InSampleChoosers Added Files: PVO_OTCCTOCorrelationChooser.cs Log Message: Added PVO_OTCCTOCorrelationChooser: this chooser selects tickers with the highest correlation of open to close - close to open returns --- NEW FILE: PVO_OTCCTOCorrelationChooser.cs --- /* QuantProject - Quantitative Finance Library PVO_OTCCTOCorrelationChooser.cs Copyright (C) 2008 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; using QuantProject.ADT; using QuantProject.ADT.Messaging; using QuantProject.Business.Strategies; using QuantProject.Business.Strategies.TickersRelationships; using QuantProject.Business.Strategies.Eligibles; using QuantProject.Business.Strategies.ReturnsManagement; using QuantProject.Business.Strategies.ReturnsManagement.Time; using QuantProject.Business.Strategies.OutOfSample; using QuantProject.Scripts.TechnicalAnalysisTesting.Oscillators.FixedLevelOscillators.PortfolioValueOscillator.InSampleChoosers; namespace QuantProject.Scripts.TechnicalAnalysisTesting.Oscillators.FixedLevelOscillators.PortfolioValueOscillator.InSampleChoosers { /// <summary> /// PVO_OTCCTOCorrelationChooser to be used for /// in sample optimization /// By means of correlation, the AnalyzeInSample method returns the /// requested number of PVOPositions (positions for the PVO strategy) /// </summary> public class PVO_OTCCTOCorrelationChooser : PVOCorrelationChooser { private float minimumAbsoluteReturnValue; private float maximumAbsoluteReturnValue; //correlation is computed only for returns //between minimum and maximum /// <summary> /// PVO_OTCCorrelationChooser to be used for /// in sample optimization /// </summary> /// <param name="numberOfBestTestingPositionsToBeReturned"> /// The number of PVOPositions that the /// AnalyzeInSample method will return /// </param> public PVO_OTCCTOCorrelationChooser(int numberOfBestTestingPositionsToBeReturned, double maxCorrelationValue, bool balancedWeightsOnVolatilityBase, float minimumAbsoluteReturnValue, float maximumAbsoluteReturnValue) : base(numberOfBestTestingPositionsToBeReturned, 1, maxCorrelationValue, balancedWeightsOnVolatilityBase, IntervalsType.OpenToCloseCloseToOpenIntervals) { this.minimumAbsoluteReturnValue = minimumAbsoluteReturnValue; this.maximumAbsoluteReturnValue = maximumAbsoluteReturnValue; } protected override void setCorrelationProvider(EligibleTickers eligibleTickers , ReturnsManager returnsManager) { this.correlationProvider = new OpenToCloseCloseToOpenCorrelationProvider(eligibleTickers.Tickers, returnsManager, this.minimumAbsoluteReturnValue , this.maximumAbsoluteReturnValue); } } } |