[Quantproject-developers] QuantProject/b4_Business/a2_Strategies/Optimizing/Decoding BasicDecoderF
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2011-01-16 19:05:27
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/Optimizing/Decoding In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18359/Optimizing/Decoding Added Files: BasicDecoderForGeneticallyOptimizableTestingPositions.cs Log Message: Added a basic decoder for GeneticallyOptimizableTestingPositions --- NEW FILE: BasicDecoderForGeneticallyOptimizableTestingPositions.cs --- /* QuantProject - Quantitative Finance Library BasicDecoderForGeneticallyOptimizableTestingPositions.cs Copyright (C) 2010 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.Decoding; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Strategies.Eligibles; using QuantProject.Business.Strategies.OutOfSample; using QuantProject.Business.Strategies.ReturnsManagement; namespace QuantProject.Business.Strategies.Optimizing.Decoding { /// <summary> /// Decodes optimization candidates to a GeneticallyOptimizableTestingPositions /// </summary> [Serializable] public class BasicDecoderForGeneticallyOptimizableTestingPositions : BasicDecoderForTestingPositions { public BasicDecoderForGeneticallyOptimizableTestingPositions() : base() { } protected override TestingPositions getMeaningForUndecodable() { return new GeneticallyOptimizableTestingPositions(); } protected override TestingPositions decodeDecodable() { SignedTickers signedTickers = this.decodeSignedTickers(); GeneticallyOptimizableTestingPositions genOptPositions = new GeneticallyOptimizableTestingPositions( new WeightedPositions( this.getUnsignedWeights(signedTickers), signedTickers) ); return genOptPositions; } protected override string getDescription() { return "GntclOptmzTstPstn_Dcdr_NoWghts"; } } } |