quantproject-developers Mailing List for QuantProject (Page 116)
Brought to you by:
glauco_1
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(103) |
Dec
(67) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(9) |
Mar
(69) |
Apr
(53) |
May
(80) |
Jun
(23) |
Jul
(24) |
Aug
(112) |
Sep
(9) |
Oct
|
Nov
(58) |
Dec
(93) |
| 2005 |
Jan
(90) |
Feb
(93) |
Mar
(61) |
Apr
(56) |
May
(37) |
Jun
(61) |
Jul
(55) |
Aug
(68) |
Sep
(25) |
Oct
(46) |
Nov
(41) |
Dec
(37) |
| 2006 |
Jan
(33) |
Feb
(7) |
Mar
(19) |
Apr
(27) |
May
(73) |
Jun
(49) |
Jul
(83) |
Aug
(66) |
Sep
(45) |
Oct
(16) |
Nov
(15) |
Dec
(7) |
| 2007 |
Jan
(14) |
Feb
(33) |
Mar
|
Apr
(21) |
May
|
Jun
(34) |
Jul
(18) |
Aug
(100) |
Sep
(39) |
Oct
(55) |
Nov
(12) |
Dec
(2) |
| 2008 |
Jan
(120) |
Feb
(133) |
Mar
(129) |
Apr
(104) |
May
(42) |
Jun
(2) |
Jul
(52) |
Aug
(99) |
Sep
(134) |
Oct
|
Nov
(137) |
Dec
(48) |
| 2009 |
Jan
(48) |
Feb
(55) |
Mar
(61) |
Apr
(3) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(51) |
Sep
|
Oct
(7) |
Nov
|
Dec
|
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
(145) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
|
| 2011 |
Jan
(78) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(88) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Glauco S. <gla...@us...> - 2005-02-13 00:49:24
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20001/b4_Business/a1_Financial/a2_Accounting Modified Files: Account.cs Log Message: - a new constructor has been added, with an ICommissionManager parameter - now commissions are added when transactions are added Index: Account.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Account.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Account.cs 6 Feb 2005 18:26:32 -0000 1.14 --- Account.cs 13 Feb 2005 00:49:14 -0000 1.15 *************** *** 49,65 **** /// ! [Serializable] ! public class Account : Keyed , IComparable ! { ! private double cashAmount; ! private AccountStrategy accountStrategy; private IEndOfDayTimer endOfDayTimer; private IDataStreamer dataStreamer; private IOrderExecutor orderExecutor; private ArrayList activeOrders; private AccountReport accountReport; ! public Portfolio Portfolio = new Portfolio(); ! //public AccountReport accountReport; public double CashAmount --- 49,66 ---- /// ! [Serializable] ! public class Account : Keyed , IComparable ! { ! private double cashAmount; ! private AccountStrategy accountStrategy; private IEndOfDayTimer endOfDayTimer; private IDataStreamer dataStreamer; private IOrderExecutor orderExecutor; + private ICommissionManager commissionManager; private ArrayList activeOrders; private AccountReport accountReport; ! public Portfolio Portfolio = new Portfolio(); ! //public AccountReport accountReport; public double CashAmount *************** *** 87,115 **** public AccountStrategy AccountStrategy ! { ! get { return accountStrategy; } ! set { accountStrategy = value; } ! } ! public TransactionHistory Transactions = new TransactionHistory(); ! public Account( string accountName ) : base ( accountName ) ! { ! this.initialize(); ! } ! private void initialize() ! { ! cashAmount = 0; this.activeOrders = new ArrayList(); ! accountStrategy = new AccountStrategy( this ); ! } ! public Account() : base ( "account" ) ! { ! this.initialize(); ! } ! public Account( string accountName , IEndOfDayTimer endOfDayTimer , ! IDataStreamer dataStreamer , IOrderExecutor orderExecutor ) : base( accountName ) { this.endOfDayTimer = endOfDayTimer; --- 88,116 ---- public AccountStrategy AccountStrategy ! { ! get { return accountStrategy; } ! set { accountStrategy = value; } ! } ! public TransactionHistory Transactions = new TransactionHistory(); ! public Account( string accountName ) : base ( accountName ) ! { ! this.initialize(); ! } ! private void initialize() ! { ! cashAmount = 0; this.activeOrders = new ArrayList(); ! accountStrategy = new AccountStrategy( this ); ! } ! public Account() : base ( "account" ) ! { ! this.initialize(); ! } ! private void initialize( IEndOfDayTimer endOfDayTimer , IDataStreamer dataStreamer , ! IOrderExecutor orderExecutor ) { this.endOfDayTimer = endOfDayTimer; *************** *** 118,121 **** --- 119,136 ---- this.orderExecutor.OrderFilled += new OrderFilledEventHandler( this.orderFilledEventHandler ); + } + public Account( string accountName , IEndOfDayTimer endOfDayTimer , + IDataStreamer dataStreamer , IOrderExecutor orderExecutor ) : base( accountName ) + { + this.initialize( endOfDayTimer , dataStreamer , orderExecutor ); + this.initialize(); + } + + public Account( string accountName , IEndOfDayTimer endOfDayTimer , + IDataStreamer dataStreamer , IOrderExecutor orderExecutor , + ICommissionManager commissionManager ) : base( accountName ) + { + this.initialize( endOfDayTimer , dataStreamer , orderExecutor ); + this.commissionManager = commissionManager; this.initialize(); } *************** *** 148,174 **** return returnValue; } ! public void Clear() ! { ! this.cashAmount = 0; ! this.Transactions.Clear(); ! this.Portfolio.Clear(); ! } ! public void AddCash( EndOfDayDateTime endOfDayDateTime , double moneyAmount ) ! { ! try ! { ! EndOfDayTransaction timedTransaction = ! new EndOfDayTransaction( TransactionType.AddCash , moneyAmount , endOfDayDateTime.Copy() ); ! this.Add( timedTransaction ); ! //Transactions.MultiAdd( extendedDateTime.DateTime , timedTransaction ); ! //cashAmount = cashAmount + moneyAmount; ! } ! catch (Exception exception) ! { exception = exception; // to avoid warning message ! /// TO DO!!! ! } ! } public void AddCash( double moneyAmount ) --- 163,189 ---- return returnValue; } ! public void Clear() ! { ! this.cashAmount = 0; ! this.Transactions.Clear(); ! this.Portfolio.Clear(); ! } ! public void AddCash( EndOfDayDateTime endOfDayDateTime , double moneyAmount ) ! { ! try ! { ! EndOfDayTransaction timedTransaction = ! new EndOfDayTransaction( TransactionType.AddCash , moneyAmount , endOfDayDateTime.Copy() ); ! this.Add( timedTransaction ); ! //Transactions.MultiAdd( extendedDateTime.DateTime , timedTransaction ); ! //cashAmount = cashAmount + moneyAmount; ! } ! catch (Exception exception) ! { exception = exception; // to avoid warning message ! /// TO DO!!! ! } ! } public void AddCash( double moneyAmount ) *************** *** 192,199 **** ! private void updateCash( Transaction transaction ) ! { ! cashAmount += transaction.CashFlow() - transaction.Commission.Value; ! } protected virtual Commission getCommission( Transaction transaction ) --- 207,216 ---- ! private void updateCash( Transaction transaction ) ! { ! cashAmount += transaction.CashFlow(); ! if ( transaction.Commission != null ) ! cashAmount -= transaction.Commission.Value; ! } protected virtual Commission getCommission( Transaction transaction ) *************** *** 201,225 **** return new Commission( transaction ); } ! public void Add( EndOfDayTransaction transaction ) ! { ! transaction.Commission = this.getCommission( transaction ); ! this.Transactions.Add( transaction ); ! this.updateCash( transaction ); ! this.Portfolio.Update( transaction ); ! //this.accountReport.AddRecord( this ); ! } ! // public void Add( Transaction transaction ) ! // { ! // this.Transactions.Add( transaction ); ! // this.updateCash( transaction ); ! // this.Portfolio.Update( transaction ); ! // //this.accountReport.AddRecord( this ); ! // } ! // ! // public double GetMarketValue( EndOfDayDateTime endOfDayDateTime ) ! // { ! // return this.CashAmount + this.Portfolio.GetMarketValue( endOfDayDateTime ); ! // } public double GetMarketValue( string ticker ) { --- 218,244 ---- return new Commission( transaction ); } ! public void Add( EndOfDayTransaction transaction ) ! { ! if ( this.commissionManager != null ) ! // an ICommissionManager has been passed to the constructor ! transaction.Commission = this.commissionManager.GetCommission( transaction ); ! this.Transactions.Add( transaction ); ! this.updateCash( transaction ); ! this.Portfolio.Update( transaction ); ! //this.accountReport.AddRecord( this ); ! } ! // public void Add( Transaction transaction ) ! // { ! // this.Transactions.Add( transaction ); ! // this.updateCash( transaction ); ! // this.Portfolio.Update( transaction ); ! // //this.accountReport.AddRecord( this ); ! // } ! // ! // public double GetMarketValue( EndOfDayDateTime endOfDayDateTime ) ! // { ! // return this.CashAmount + this.Portfolio.GetMarketValue( endOfDayDateTime ); ! // } public double GetMarketValue( string ticker ) { *************** *** 235,275 **** this.Portfolio.GetMarketValue( this.dataStreamer ); } ! // public double GetProfitNetLoss( EndOfDayDateTime endOfDayDateTime ) ! // { ! // return GetMarketValue( endOfDayDateTime ) + ! // this.Transactions.TotalWithdrawn - ! // this.Transactions.TotalAddedCash; ! // } ! // public History GetProfitNetLossHistory( EndOfDayDateTime finalDateTime ) ! // { ! // History history = new History(); ! // Account account = new Account( "ToGetProfitNetLossHistory" ); ! // foreach ( ArrayList arrayList in this.Transactions.Values ) ! // foreach ( EndOfDayTransaction transaction in arrayList ) ! // { ! // account.Add( transaction ); ! // history.MultiAdd( transaction.EndOfDayDateTime.DateTime , ! // account.GetProfitNetLoss( transaction.EndOfDayDateTime ) ); ! // } ! // history.MultiAdd( finalDateTime.DateTime , ! // account.GetProfitNetLoss( finalDateTime ) ); ! // return history; ! // } ! // ! public string ToString( DateTime dateTime ) ! { ! return ! "\nCashAmount : " + this.CashAmount + ! "\nPortfolioContent : " + this.Portfolio.ToString() + ! "\nPortfolioMarketValue : " + this.Portfolio.GetMarketValue( ! this.dataStreamer ); ! } ! // public AccountReport CreateReport( string reportName , ! // int numDaysForInterval , EndOfDayDateTime endDateTime ) ! // { ! // AccountReport accountReport = new AccountReport( this ); ! // return accountReport.Create( reportName , numDaysForInterval , endDateTime ); ! // } public AccountReport CreateReport( string reportName , int numDaysForInterval , EndOfDayDateTime endDateTime , string buyAndHoldTicker , --- 254,294 ---- this.Portfolio.GetMarketValue( this.dataStreamer ); } ! // public double GetProfitNetLoss( EndOfDayDateTime endOfDayDateTime ) ! // { ! // return GetMarketValue( endOfDayDateTime ) + ! // this.Transactions.TotalWithdrawn - ! // this.Transactions.TotalAddedCash; ! // } ! // public History GetProfitNetLossHistory( EndOfDayDateTime finalDateTime ) ! // { ! // History history = new History(); ! // Account account = new Account( "ToGetProfitNetLossHistory" ); ! // foreach ( ArrayList arrayList in this.Transactions.Values ) ! // foreach ( EndOfDayTransaction transaction in arrayList ) ! // { ! // account.Add( transaction ); ! // history.MultiAdd( transaction.EndOfDayDateTime.DateTime , ! // account.GetProfitNetLoss( transaction.EndOfDayDateTime ) ); ! // } ! // history.MultiAdd( finalDateTime.DateTime , ! // account.GetProfitNetLoss( finalDateTime ) ); ! // return history; ! // } ! // ! public string ToString( DateTime dateTime ) ! { ! return ! "\nCashAmount : " + this.CashAmount + ! "\nPortfolioContent : " + this.Portfolio.ToString() + ! "\nPortfolioMarketValue : " + this.Portfolio.GetMarketValue( ! this.dataStreamer ); ! } ! // public AccountReport CreateReport( string reportName , ! // int numDaysForInterval , EndOfDayDateTime endDateTime ) ! // { ! // AccountReport accountReport = new AccountReport( this ); ! // return accountReport.Create( reportName , numDaysForInterval , endDateTime ); ! // } public AccountReport CreateReport( string reportName , int numDaysForInterval , EndOfDayDateTime endDateTime , string buyAndHoldTicker , |
|
From: Glauco S. <gla...@us...> - 2005-02-13 00:46:47
|
Update of /cvsroot/quantproject/QuantProject/b4_Business In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18820/b4_Business Modified Files: b4_Business.csproj Log Message: - IBCommission.cs has been added - IBCommissionManager.cs has been added - ICommissionManager.cs has been added Index: b4_Business.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/b4_Business.csproj,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** b4_Business.csproj 6 Feb 2005 18:07:34 -0000 1.19 --- b4_Business.csproj 13 Feb 2005 00:46:39 -0000 1.20 *************** *** 303,306 **** --- 303,321 ---- /> <File + RelPath = "a1_Financial\a2_Accounting\Commissions\IBCommission.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "a1_Financial\a2_Accounting\Commissions\IBCommissionManager.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "a1_Financial\a2_Accounting\Commissions\ICommissionManager.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "a1_Financial\a2_Accounting\h5_Reporting\AccountReport.cs" SubType = "Code" |
|
From: Glauco S. <gla...@us...> - 2005-02-13 00:44:33
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17641/b4_Business/a1_Financial/a2_Accounting/Commissions Modified Files: Commission.cs Log Message: transaction member has been changed from private to protected Index: Commission.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions/Commission.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Commission.cs 12 Feb 2005 19:07:39 -0000 1.2 --- Commission.cs 13 Feb 2005 00:44:24 -0000 1.3 *************** *** 33,37 **** public class Commission { ! private Transaction transaction; public virtual double Value --- 33,37 ---- public class Commission { ! protected Transaction transaction; public virtual double Value |
|
From: Glauco S. <gla...@us...> - 2005-02-13 00:43:10
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16991/b4_Business/a1_Financial/a2_Accounting/Commissions Added Files: IBCommission.cs Log Message: A sample Commission --- NEW FILE: IBCommission.cs --- /* QuantProject - Quantitative Finance Library IBCommission.cs Copyright (C) 2003 Glauco Siliprandi 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; namespace QuantProject.Business.Financial.Accounting.Commissions { /// <summary> /// A sample Commission /// </summary> public class IBCommission : Commission { public override double Value { get { double returnValue = this.transaction.Quantity * 0.01; return Math.Max( returnValue , 1.0 ); } } public IBCommission( Transaction transaction ) : base( transaction ) { } } } |
|
From: Glauco S. <gla...@us...> - 2005-02-13 00:42:34
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16630/b4_Business/a1_Financial/a2_Accounting/Commissions Added Files: IBCommissionManager.cs Log Message: A sample Commission Manager --- NEW FILE: IBCommissionManager.cs --- /* QuantProject - Quantitative Finance Library ICCommissionManager.cs Copyright (C) 2003 Glauco Siliprandi 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; namespace QuantProject.Business.Financial.Accounting.Commissions { /// <summary> /// A sample Commission Manager /// </summary> public class IBCommissionManager : ICommissionManager { public IBCommissionManager() { } public Commission GetCommission( Transaction transaction ) { return new IBCommission( transaction ); } } } |
|
From: Glauco S. <gla...@us...> - 2005-02-13 00:40:05
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15345/b4_Business/a1_Financial/a2_Accounting/Commissions Added Files: ICommissionManager.cs Log Message: Interface to be implemented by commission generators --- NEW FILE: ICommissionManager.cs --- /* QuantProject - Quantitative Finance Library ICommissionManager.cs Copyright (C) 2003 Glauco Siliprandi 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; namespace QuantProject.Business.Financial.Accounting.Commissions { /// <summary> /// Interface to be implemented by commission generators /// </summary> public interface ICommissionManager { Commission GetCommission( Transaction transaction ); } } |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:17:03
|
Update of /cvsroot/quantproject/QuantProject/b91_QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1573/b91_QuantProject Modified Files: Main.cs Log Message: Added parameter numDaysForLiquidity. Now this script presents several parameters for some type of optimization. Index: Main.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b91_QuantProject/Main.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Main.cs 6 Feb 2005 20:15:23 -0000 1.10 --- Main.cs 12 Feb 2005 19:16:46 -0000 1.11 *************** *** 357,364 **** //new RunWalkForwardOneRank().Run(); //new RunEfficientCTCPorfolio().Run(); ! //new RunEfficientCTOPorfolio("STOCKMI",70,5,5,1000).Run(); ! new RunEfficientCTOPorfolio("STOCKMI",100,5,5,1000).Run(); ! new RunEfficientCTOPorfolio("STOCKMI",70,5,10,2500).Run(); ! new RunEfficientCTOPorfolio("STOCKMI",100,5,10,2500).Run(); } catch ( Exception ex ) --- 357,366 ---- //new RunWalkForwardOneRank().Run(); //new RunEfficientCTCPorfolio().Run(); ! new RunEfficientCTOPorfolio("STOCKMI",100,5,30,10,2500).Run(); ! new RunEfficientCTOPorfolio("STOCKMI",100,5,60,10,2500).Run(); ! //new RunEfficientCTOPorfolio("STOCKMI",100,5,5,1000).Run(); ! //new RunEfficientCTOPorfolio("STOCKMI",70,5,10,2500).Run(); ! //new RunEfficientCTOPorfolio("STOCKMI",100,5,10,2500).Run(); ! } catch ( Exception ex ) |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:17:03
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1573/b7_Scripts/TickerSelectionTesting Modified Files: EndOfDayTimerHandlerCTO.cs RunEfficientCTOPortfolio.cs Log Message: Added parameter numDaysForLiquidity. Now this script presents several parameters for some type of optimization. Index: EndOfDayTimerHandlerCTO.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/EndOfDayTimerHandlerCTO.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EndOfDayTimerHandlerCTO.cs 6 Feb 2005 20:14:01 -0000 1.2 --- EndOfDayTimerHandlerCTO.cs 12 Feb 2005 19:16:46 -0000 1.3 *************** *** 51,54 **** --- 51,55 ---- private int numberOfEligibleTickers; private int numberOfTickersToBeChosen; + private int numDaysForLiquidity; private int generationNumberForGeneticOptimizer; private int populationSizeForGeneticOptimizer; *************** *** 68,72 **** public EndOfDayTimerHandlerCTO(string tickerGroupID, int numberOfEligibleTickers, ! int numberOfTickersToBeChosen, Account account, int generationNumberForGeneticOptimizer, int populationSizeForGeneticOptimizer) --- 69,73 ---- public EndOfDayTimerHandlerCTO(string tickerGroupID, int numberOfEligibleTickers, ! int numberOfTickersToBeChosen, int numDaysForLiquidity, Account account, int generationNumberForGeneticOptimizer, int populationSizeForGeneticOptimizer) *************** *** 75,78 **** --- 76,80 ---- this.numberOfEligibleTickers = numberOfEligibleTickers; this.numberOfTickersToBeChosen = numberOfTickersToBeChosen; + this.numDaysForLiquidity = numDaysForLiquidity; this.account = account; this.generationNumberForGeneticOptimizer = generationNumberForGeneticOptimizer; *************** *** 171,180 **** { TickerSelector mostLiquid = new TickerSelector(SelectionType.Liquidity, ! false, this.tickerGroupID , currentDate.AddDays(-45), currentDate, this.numberOfEligibleTickers); this.eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); TickerSelector quotedInEachMarketDayFromMostLiquid = new TickerSelector( this.eligibleTickers, SelectionType.QuotedInEachMarketDay, false, "", ! currentDate.AddDays(-45),currentDate, this.numberOfEligibleTickers); quotedInEachMarketDayFromMostLiquid.MarketIndex = "^MIBTEL"; --- 173,182 ---- { TickerSelector mostLiquid = new TickerSelector(SelectionType.Liquidity, ! false, this.tickerGroupID , currentDate.AddDays(-this.numDaysForLiquidity), currentDate, this.numberOfEligibleTickers); this.eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); TickerSelector quotedInEachMarketDayFromMostLiquid = new TickerSelector( this.eligibleTickers, SelectionType.QuotedInEachMarketDay, false, "", ! currentDate.AddDays(-this.numDaysForLiquidity),currentDate, this.numberOfEligibleTickers); quotedInEachMarketDayFromMostLiquid.MarketIndex = "^MIBTEL"; Index: RunEfficientCTOPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientCTOPortfolio.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RunEfficientCTOPortfolio.cs 6 Feb 2005 20:14:01 -0000 1.11 --- RunEfficientCTOPortfolio.cs 12 Feb 2005 19:16:46 -0000 1.12 *************** *** 64,67 **** --- 64,68 ---- private int numberOfEligibleTickers; private int numberOfTickersToBeChosen; + private int numDaysForLiquidity; private int generationNumberForGeneticOptimizer; private int populationSizeForGeneticOptimizer; *************** *** 84,88 **** public RunEfficientCTOPorfolio(string tickerGroupID, int numberOfEligibleTickers, ! int numberOfTickersToBeChosen, int generationNumberForGeneticOptimizer, int populationSizeForGeneticOptimizer) { --- 85,90 ---- public RunEfficientCTOPorfolio(string tickerGroupID, int numberOfEligibleTickers, ! int numberOfTickersToBeChosen, int numDaysForLiquidity, ! int generationNumberForGeneticOptimizer, int populationSizeForGeneticOptimizer) { *************** *** 91,94 **** --- 93,97 ---- this.numberOfEligibleTickers = numberOfEligibleTickers; this.numberOfTickersToBeChosen = numberOfTickersToBeChosen; + this.numDaysForLiquidity = numDaysForLiquidity; this.generationNumberForGeneticOptimizer = generationNumberForGeneticOptimizer; this.populationSizeForGeneticOptimizer = populationSizeForGeneticOptimizer; *************** *** 141,144 **** --- 144,148 ---- this.numberOfEligibleTickers, this.numberOfTickersToBeChosen, + this.numDaysForLiquidity, this.account, this.generationNumberForGeneticOptimizer, *************** *** 202,206 **** ObjectArchiver.Archive(this.account, "C:\\Documents and Settings\\Marco\\Documenti\\ProgettiOpenSource\\Quant\\SavedAccounts\\OpenCloseScripts\\" + ! "From"+this.numberOfEligibleTickers + "Portfolio" + this.numberOfTickersToBeChosen + "GenNum" + this.generationNumberForGeneticOptimizer + --- 206,211 ---- ObjectArchiver.Archive(this.account, "C:\\Documents and Settings\\Marco\\Documenti\\ProgettiOpenSource\\Quant\\SavedAccounts\\OpenCloseScripts\\" + ! "From"+this.numberOfEligibleTickers + ! "LiqDays" + this.numDaysForLiquidity + "Portfolio" + this.numberOfTickersToBeChosen + "GenNum" + this.generationNumberForGeneticOptimizer + |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:14:00
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunScripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv369/b7_Scripts/CallingReportsForRunScripts Modified Files: ShowReportFromFile.cs Log Message: Now a ReportShower is used, inside method for calling report using a serialized account. Added method ShowReportFromSerializedAccountReport. (it has to be completed; must talk to Glauco: how many serialized objects are necessary for calling Report?) Index: ShowReportFromFile.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunScripts/ShowReportFromFile.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ShowReportFromFile.cs 6 Feb 2005 20:06:05 -0000 1.1 --- ShowReportFromFile.cs 12 Feb 2005 19:13:50 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- using QuantProject.Business.Timing; using QuantProject.Business.Financial.Accounting; + using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.DataProviders; using QuantProject.ADT.FileManaging; *************** *** 45,53 **** Account account = (Account)ObjectArchiver.Extract(serializedAccountFullPath); - Report report = new Report(account, new HistoricalAdjustedQuoteProvider()); ! report.Show("CtcPortfolio",3, ! new EndOfDayDateTime(new DateTime(2004,10,31), EndOfDaySpecificTime.MarketClose), "^MIBTEL"); ! } catch(System.Exception ex) --- 46,52 ---- Account account = (Account)ObjectArchiver.Extract(serializedAccountFullPath); Report report = new Report(account, new HistoricalAdjustedQuoteProvider()); ! ReportShower reportShower = new ReportShower(report); ! reportShower.Show(); } catch(System.Exception ex) *************** *** 56,59 **** --- 55,74 ---- } } + + public static void ShowReportFromSerializedAccountReport(string serializedAccountReportFullPath) + { + try + { + AccountReport accountReport = + (AccountReport)ObjectArchiver.Extract(serializedAccountReportFullPath); + ///TODO: ... + + } + catch(System.Exception ex) + { + System.Windows.Forms.MessageBox.Show(ex.ToString()); + } + } + } } |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:10:30
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31435/b5_Presentation/Reporting/WindowsForm Modified Files: Report.cs Log Message: Added Clear and Import public methods, for clearing / importing account report member. Index: Report.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm/Report.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Report.cs 30 Jan 2005 19:57:39 -0000 1.5 --- Report.cs 12 Feb 2005 19:10:18 -0000 1.6 *************** *** 75,78 **** --- 75,93 ---- base.ShowDialog(); } + /// <summary> + /// Clears the existing account report, so that a new one can be created + /// </summary> + public void Clear() + { + this.accountReport = null; + } + + /// <summary> + /// Imports an existing account report + /// </summary> + public void Import(AccountReport accountReportToBeImported) + { + this.accountReport = accountReportToBeImported; + } } } |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:07:48
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30443/b4_Business/a1_Financial/a2_Accounting/Commissions Modified Files: Commission.cs Log Message: Added "serializable" attribute Index: Commission.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions/Commission.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Commission.cs 6 Feb 2005 18:30:27 -0000 1.1 --- Commission.cs 12 Feb 2005 19:07:39 -0000 1.2 *************** *** 30,34 **** /// Base class for commissions /// </summary> ! public class Commission { private Transaction transaction; --- 30,35 ---- /// Base class for commissions /// </summary> ! [Serializable] ! public class Commission { private Transaction transaction; |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:02:11
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28139/b5_Presentation Modified Files: b5_Presentation.csproj Log Message: Added ReportShower, in order to provide visual interface for Report class Index: b5_Presentation.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/b5_Presentation.csproj,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** b5_Presentation.csproj 4 Feb 2005 00:10:26 -0000 1.19 --- b5_Presentation.csproj 12 Feb 2005 19:02:01 -0000 1.20 *************** *** 203,206 **** --- 203,216 ---- /> <File + RelPath = "Reporting\WindowsForm\ReportShower.cs" + SubType = "Form" + BuildAction = "Compile" + /> + <File + RelPath = "Reporting\WindowsForm\ReportShower.resx" + DependentUpon = "ReportShower.cs" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Reporting\WindowsForm\ReportTabControl.cs" SubType = "Component" |
|
From: Marco M. <mi...@us...> - 2005-02-12 19:02:11
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28139/b5_Presentation/Reporting/WindowsForm Added Files: ReportShower.cs Log Message: Added ReportShower, in order to provide visual interface for Report class --- NEW FILE: ReportShower.cs --- /* QuantProject - Quantitative Finance Library ReportShower.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.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using QuantProject.Business.Timing; namespace QuantProject.Presentation.Reporting.WindowsForm { /// <summary> /// Descrizione di riepilogo per ReportShower. /// </summary> public class ReportShower : System.Windows.Forms.Form { private System.Windows.Forms.Button buttonShowReport; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.NumericUpDown numDaysForEquityLine; private System.Windows.Forms.DateTimePicker endingDate; private System.Windows.Forms.TextBox reportName; private Report report; private System.Windows.Forms.Label label4; private System.Windows.Forms.TextBox index; /// <summary> /// Variabile di progettazione necessaria. /// </summary> private System.ComponentModel.Container components = null; public ReportShower(Report report) { // // Necessario per il supporto di Progettazione Windows Form // InitializeComponent(); // this.report = report; // } /// <summary> /// Pulire le risorse in uso. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// <summary> /// Metodo necessario per il supporto della finestra di progettazione. Non modificare /// il contenuto del metodo con l'editor di codice. /// </summary> private void InitializeComponent() { this.numDaysForEquityLine = new System.Windows.Forms.NumericUpDown(); this.endingDate = new System.Windows.Forms.DateTimePicker(); this.reportName = new System.Windows.Forms.TextBox(); this.buttonShowReport = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.index = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.numDaysForEquityLine)).BeginInit(); this.SuspendLayout(); // // numDaysForEquityLine // this.numDaysForEquityLine.Location = new System.Drawing.Point(144, 64); this.numDaysForEquityLine.Minimum = new System.Decimal(new int[] { 1, 0, 0, 0}); this.numDaysForEquityLine.Name = "numDaysForEquityLine"; this.numDaysForEquityLine.Size = new System.Drawing.Size(64, 20); this.numDaysForEquityLine.TabIndex = 0; this.numDaysForEquityLine.Value = new System.Decimal(new int[] { 1, 0, 0, 0}); // // endingDate // this.endingDate.Location = new System.Drawing.Point(112, 112); this.endingDate.Name = "endingDate"; this.endingDate.Size = new System.Drawing.Size(136, 20); this.endingDate.TabIndex = 1; // // reportName // this.reportName.Location = new System.Drawing.Point(104, 16); this.reportName.Name = "reportName"; this.reportName.Size = new System.Drawing.Size(176, 20); this.reportName.TabIndex = 2; this.reportName.Text = "My report"; // // buttonShowReport // this.buttonShowReport.Location = new System.Drawing.Point(80, 208); this.buttonShowReport.Name = "buttonShowReport"; this.buttonShowReport.Size = new System.Drawing.Size(128, 40); this.buttonShowReport.TabIndex = 3; this.buttonShowReport.Text = "Show"; this.buttonShowReport.Click += new System.EventHandler(this.buttonShowReport_Click); // // label1 // this.label1.Location = new System.Drawing.Point(8, 16); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(96, 16); this.label1.TabIndex = 4; this.label1.Text = "Report Name"; // // label2 // this.label2.Location = new System.Drawing.Point(8, 64); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(128, 32); this.label2.TabIndex = 5; this.label2.Text = "Num Days for equity line"; // // label3 // this.label3.Location = new System.Drawing.Point(8, 112); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(96, 16); this.label3.TabIndex = 6; this.label3.Text = "Ending Date"; // // label4 // this.label4.Location = new System.Drawing.Point(10, 160); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(96, 16); this.label4.TabIndex = 8; this.label4.Text = "Index"; // // index // this.index.Location = new System.Drawing.Point(106, 160); this.index.Name = "index"; this.index.Size = new System.Drawing.Size(176, 20); this.index.TabIndex = 7; this.index.Text = ""; // // ReportShower // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(292, 266); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.label4, this.index, this.label3, this.label2, this.label1, this.buttonShowReport, this.reportName, this.endingDate, this.numDaysForEquityLine}); this.Name = "ReportShower"; this.Text = "ReportShower"; ((System.ComponentModel.ISupportInitialize)(this.numDaysForEquityLine)).EndInit(); this.ResumeLayout(false); } #endregion private void buttonShowReport_Click(object sender, System.EventArgs e) { this.report.Clear(); this.report.Show(this.reportName.Text, (int)this.numDaysForEquityLine.Value, new EndOfDayDateTime(this.endingDate.Value, EndOfDaySpecificTime.MarketClose), this.index.Text); } } } |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:17:23
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunnedScripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2986/b7_Scripts/CallingReportsForRunnedScripts Removed Files: ShowReportFromFile.cs Log Message: Moved ShowReportFromFile to a directory named in a proper way ... --- ShowReportFromFile.cs DELETED --- |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:15:36
|
Update of /cvsroot/quantproject/QuantProject/b91_QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2555/b91_QuantProject Modified Files: Main.cs Log Message: Resolved minor conflicts, added a new item for running in release mode Index: Main.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b91_QuantProject/Main.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Main.cs 6 Feb 2005 18:18:08 -0000 1.9 --- Main.cs 6 Feb 2005 20:15:23 -0000 1.10 *************** *** 32,36 **** using QuantProject.Scripts.SimpleTesting; using QuantProject.Scripts.WalkForwardTesting.WalkForwardOneRank; ! using QuantProject.Scripts.CallingReportsForRunnedScripts; --- 32,36 ---- using QuantProject.Scripts.SimpleTesting; using QuantProject.Scripts.WalkForwardTesting.WalkForwardOneRank; ! using QuantProject.Scripts.CallingReportsForRunScripts; *************** *** 61,64 **** --- 61,65 ---- private System.Windows.Forms.MenuItem menuItemAccountViewer; private System.Windows.Forms.MenuItem menuItemShowReportFromAccount; + private System.Windows.Forms.MenuItem menuItemRunReleasingMode; /// <summary> /// Required designer variable. *************** *** 108,111 **** --- 109,113 ---- this.menuItemSavedTests = new System.Windows.Forms.MenuItem(); this.menuItemAccountViewer = new System.Windows.Forms.MenuItem(); + this.menuItemShowReportFromAccount = new System.Windows.Forms.MenuItem(); this.menuItem13 = new System.Windows.Forms.MenuItem(); this.menuItem14 = new System.Windows.Forms.MenuItem(); *************** *** 117,121 **** this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); ! this.menuItemShowReportFromAccount = new System.Windows.Forms.MenuItem(); // // mainMenu1 --- 119,123 ---- this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); ! this.menuItemRunReleasingMode = new System.Windows.Forms.MenuItem(); // // mainMenu1 *************** *** 151,155 **** this.menuItem11.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItemRun, ! this.menuItemSavedTests}); this.menuItem11.Text = "BackTest"; // --- 153,158 ---- this.menuItem11.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItemRun, ! this.menuItemSavedTests, ! this.menuItemRunReleasingMode}); this.menuItem11.Text = "BackTest"; // *************** *** 157,161 **** // this.menuItemRun.Index = 0; ! this.menuItemRun.Text = "Run"; this.menuItemRun.Click += new System.EventHandler(this.menuItemRun_Click); // --- 160,164 ---- // this.menuItemRun.Index = 0; ! this.menuItemRun.Text = "Run (debugging mode)"; this.menuItemRun.Click += new System.EventHandler(this.menuItemRun_Click); // *************** *** 174,177 **** --- 177,186 ---- this.menuItemAccountViewer.Click += new System.EventHandler(this.menuItemAccountViewer_Click); // + // menuItemShowReportFromAccount + // + this.menuItemShowReportFromAccount.Index = 1; + this.menuItemShowReportFromAccount.Text = "Show report from account"; + this.menuItemShowReportFromAccount.Click += new System.EventHandler(this.menuItemShowReportFromAccount_Click); + // // menuItem13 // *************** *** 222,230 **** this.menuItem7.Text = ""; // ! // menuItemShowReportFromAccount // ! this.menuItemShowReportFromAccount.Index = 1; ! this.menuItemShowReportFromAccount.Text = "Show report from account"; ! this.menuItemShowReportFromAccount.Click += new System.EventHandler(this.menuItemShowReportFromAccount_Click); // // Principale --- 231,239 ---- this.menuItem7.Text = ""; // ! // menuItemRunReleasingMode // ! this.menuItemRunReleasingMode.Index = 2; ! this.menuItemRunReleasingMode.Text = "Run (releasing mode)"; ! this.menuItemRunReleasingMode.Click += new System.EventHandler(this.menuItemRunReleasingMode_Click); // // Principale *************** *** 298,304 **** { } ! private void menuItemRun_Click(object sender, System.EventArgs e) { // try // {//call here your scripts --- 307,314 ---- { } ! //run scripts in debugging mode private void menuItemRun_Click(object sender, System.EventArgs e) { + // try // {//call here your scripts *************** *** 312,315 **** --- 322,326 ---- // //in this way qP shouldn't stop if running a single script fails ... // } + } *************** *** 320,328 **** } private void menuItemShowReportFromAccount_Click(object sender, System.EventArgs e) { ! ShowReportFromFile.ShowReportFromSerializedAccount("C:\\CtcPortfolio.qP"); } } } --- 331,379 ---- } + private string getPath() + { + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Title = "Select a serialized account please ..."; + openFileDialog.Multiselect = false; + openFileDialog.CheckFileExists = true; + openFileDialog.ShowDialog(); + return openFileDialog.FileName; + } + private void menuItemShowReportFromAccount_Click(object sender, System.EventArgs e) { ! string chosenPath = this.getPath(); ! if(chosenPath != "") ! ShowReportFromFile.ShowReportFromSerializedAccount(chosenPath); } + + private void menuItemRunReleasingMode_Click(object sender, System.EventArgs e) + { + try + { + this.Cursor = Cursors.WaitCursor; + //call here your scripts + //new RunWalkForwardOneRank().Run(); + //new RunEfficientCTCPorfolio().Run(); + //new RunEfficientCTOPorfolio("STOCKMI",70,5,5,1000).Run(); + new RunEfficientCTOPorfolio("STOCKMI",100,5,5,1000).Run(); + new RunEfficientCTOPorfolio("STOCKMI",70,5,10,2500).Run(); + new RunEfficientCTOPorfolio("STOCKMI",100,5,10,2500).Run(); + } + catch ( Exception ex ) + { + string notUsed = ex.ToString(); + //in this way qP shouldn't stop if running a single script fails ... + } + finally + { + this.Cursor = Cursors.Default; + } + } + + + + } } |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:14:12
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2069/b7_Scripts/TickerSelectionTesting Modified Files: EndOfDayTimerHandlerCTO.cs GenomeManagerForEfficientCTOPortfolio.cs GenomeManagerForEfficientPortfolio.cs RunEfficientCTCPortfolio.cs RunEfficientCTOPortfolio.cs Log Message: Resolved minor conflicts, fixed some bugs (in OpenToClose script) and used the ObjectArchiver methods for serializing and deserializing accounts at the end of the scripts Index: EndOfDayTimerHandlerCTO.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/EndOfDayTimerHandlerCTO.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EndOfDayTimerHandlerCTO.cs 30 Jan 2005 19:53:12 -0000 1.1 --- EndOfDayTimerHandlerCTO.cs 6 Feb 2005 20:14:01 -0000 1.2 *************** *** 41,49 **** /// These handlers contain the core strategy for the efficient close to open portfolio! /// </summary> public class EndOfDayTimerHandlerCTO { private DataTable eligibleTickers; private string[] chosenTickers; ! //private string[] lastChosenTickers; private string tickerGroupID; --- 41,50 ---- /// These handlers contain the core strategy for the efficient close to open portfolio! /// </summary> + [Serializable] public class EndOfDayTimerHandlerCTO { private DataTable eligibleTickers; private string[] chosenTickers; ! private string[] lastChosenTickers; private string tickerGroupID; *************** *** 51,54 **** --- 52,56 ---- private int numberOfTickersToBeChosen; private int generationNumberForGeneticOptimizer; + private int populationSizeForGeneticOptimizer; private Account account; *************** *** 67,71 **** public EndOfDayTimerHandlerCTO(string tickerGroupID, int numberOfEligibleTickers, int numberOfTickersToBeChosen, Account account, ! int generationNumberForGeneticOptimizer) { this.tickerGroupID = tickerGroupID; --- 69,74 ---- public EndOfDayTimerHandlerCTO(string tickerGroupID, int numberOfEligibleTickers, int numberOfTickersToBeChosen, Account account, ! int generationNumberForGeneticOptimizer, ! int populationSizeForGeneticOptimizer) { this.tickerGroupID = tickerGroupID; *************** *** 74,80 **** this.account = account; this.generationNumberForGeneticOptimizer = generationNumberForGeneticOptimizer; this.orders = new ArrayList(); this.chosenTickers = new string[numberOfTickersToBeChosen]; ! //this.lastChosenTickers = new string[numberOfTickersToBeChosen]; } --- 77,84 ---- this.account = account; this.generationNumberForGeneticOptimizer = generationNumberForGeneticOptimizer; + this.populationSizeForGeneticOptimizer = populationSizeForGeneticOptimizer; this.orders = new ArrayList(); this.chosenTickers = new string[numberOfTickersToBeChosen]; ! this.lastChosenTickers = new string[numberOfTickersToBeChosen]; } *************** *** 94,101 **** --- 98,110 ---- private void marketOpenEventHandler_orderChosenTickers_addToOrderList() { + int idx = 0; foreach ( string ticker in this.chosenTickers ) { if(ticker != null) + { marketOpenEventHandler_orderChosenTickers_addToOrderList_forTicker( ticker ); + this.lastChosenTickers[idx] = ticker; + } + idx++; } } *************** *** 135,141 **** private void marketCloseEventHandler_closePositions() { ! if(this.chosenTickers != null) { ! foreach( string ticker in this.chosenTickers) { for(int i = 0; i<this.account.Portfolio.Keys.Count; i++) --- 144,150 ---- private void marketCloseEventHandler_closePositions() { ! if(this.lastChosenTickers != null) { ! foreach( string ticker in this.lastChosenTickers) { for(int i = 0; i<this.account.Portfolio.Keys.Count; i++) *************** *** 176,182 **** private void setTickers(DateTime currentDate) { ! //this.lastChosenTickers = this.chosenTickers; DataTable setOfTickersToBeOptimized = this.getSetOfTickersToBeOptimized(currentDate); ! if(setOfTickersToBeOptimized.Rows.Count >= this.chosenTickers.Length) //the optimization process is possible only if the initial set of tickers is //as large as the number of tickers to be chosen --- 185,191 ---- private void setTickers(DateTime currentDate) { ! DataTable setOfTickersToBeOptimized = this.getSetOfTickersToBeOptimized(currentDate); ! if(setOfTickersToBeOptimized.Rows.Count > this.chosenTickers.Length*2) //the optimization process is possible only if the initial set of tickers is //as large as the number of tickers to be chosen *************** *** 189,192 **** --- 198,202 ---- //GO.KeepOnRunningUntilConvergenceIsReached = true; GO.GenerationNumber = this.generationNumberForGeneticOptimizer; + GO.PopulationSize = this.populationSizeForGeneticOptimizer; GO.Run(false); this.chosenTickers = (string[])GO.BestGenome.Meaning; Index: GenomeManagerForEfficientPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/GenomeManagerForEfficientPortfolio.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GenomeManagerForEfficientPortfolio.cs 30 Jan 2005 19:53:11 -0000 1.2 --- GenomeManagerForEfficientPortfolio.cs 6 Feb 2005 20:14:01 -0000 1.3 *************** *** 110,115 **** NormalDistribution normal = new NormalDistribution(portfolioRateOfReturn, Math.Sqrt(portfolioVariance)); ! //returnValue = normal.GetProbability(this.targetPerformance*0.5,this.targetPerformance*1.5); ! returnValue = 1 - normal.GetProbability(this.targetPerformance); return returnValue; } --- 110,115 ---- NormalDistribution normal = new NormalDistribution(portfolioRateOfReturn, Math.Sqrt(portfolioVariance)); ! returnValue = normal.GetProbability(this.targetPerformance*0.75,this.targetPerformance*1.25); ! //returnValue = 1 - normal.GetProbability(this.targetPerformance); return returnValue; } *************** *** 227,241 **** Quotes tickerQuotes = new Quotes(ticker, this.firstQuoteDate, this.lastQuoteDate); float[] allAdjValues = ExtendedDataTable.GetArrayOfFloatFromColumn(tickerQuotes, "quAdjustedClose"); - //float[] ratesOfReturns = new float[allAdjValues.Length/this.intervalLength + 1]; float[] ratesOfReturns = new float[allAdjValues.Length]; int i = 0; //index for ratesOfReturns array ! /* ! for(int idx = 0; idx + this.intervalLength < allAdjValues.Length; idx += this.intervalLength ) ! { ! ratesOfReturns[i] = allAdjValues[idx+this.intervalLength]/ ! allAdjValues[idx] - 1; ! i++; ! } ! */ for(int idx = 0; idx < allAdjValues.Length; idx++) { --- 227,233 ---- Quotes tickerQuotes = new Quotes(ticker, this.firstQuoteDate, this.lastQuoteDate); float[] allAdjValues = ExtendedDataTable.GetArrayOfFloatFromColumn(tickerQuotes, "quAdjustedClose"); float[] ratesOfReturns = new float[allAdjValues.Length]; int i = 0; //index for ratesOfReturns array ! for(int idx = 0; idx < allAdjValues.Length; idx++) { Index: RunEfficientCTCPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientCTCPortfolio.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RunEfficientCTCPortfolio.cs 6 Feb 2005 18:19:10 -0000 1.3 --- RunEfficientCTCPortfolio.cs 6 Feb 2005 20:14:01 -0000 1.4 *************** *** 63,67 **** --- 63,69 ---- private EndOfDayDateTime startDateTime; private EndOfDayDateTime endDateTime; + // private int numIntervalDays;// number of days for the equity line graph + private IHistoricalQuoteProvider historicalQuoteProvider = new HistoricalAdjustedQuoteProvider(); *************** *** 81,88 **** this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 2000 , 1 , 1 ) , EndOfDaySpecificTime.MarketOpen ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2000 , 1 , 20 ) , EndOfDaySpecificTime.MarketClose ); ! // this.numIntervalDays = 3; //for report } #region Run --- 83,91 ---- this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 2004 , 1 , 1 ) , EndOfDaySpecificTime.MarketOpen ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2004 , 3 , 31 ) , EndOfDaySpecificTime.MarketClose ); ! //this.numIntervalDays = 3; //for report ! } #region Run Index: GenomeManagerForEfficientCTOPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/GenomeManagerForEfficientCTOPortfolio.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GenomeManagerForEfficientCTOPortfolio.cs 30 Jan 2005 19:53:10 -0000 1.3 --- GenomeManagerForEfficientCTOPortfolio.cs 6 Feb 2005 20:14:01 -0000 1.4 *************** *** 86,91 **** protected override float[] getArrayOfRatesOfReturn(string ticker) { Quotes tickerQuotes = new Quotes(ticker, this.firstQuoteDate, this.lastQuoteDate); ! return ExtendedDataTable.GetArrayOfFloatFromRatioOfColumns(tickerQuotes, "quClose", "quOpen"); } --- 86,97 ---- protected override float[] getArrayOfRatesOfReturn(string ticker) { + float[] returnValue; Quotes tickerQuotes = new Quotes(ticker, this.firstQuoteDate, this.lastQuoteDate); ! returnValue = ExtendedDataTable.GetArrayOfFloatFromRatioOfColumns(tickerQuotes, "quClose", "quOpen"); ! for(int idx = 0; idx!= returnValue.Length; idx++) ! { ! returnValue[idx] = returnValue[idx] - 1; ! } ! return returnValue; } Index: RunEfficientCTOPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientCTOPortfolio.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RunEfficientCTOPortfolio.cs 30 Jan 2005 19:53:11 -0000 1.10 --- RunEfficientCTOPortfolio.cs 6 Feb 2005 20:14:01 -0000 1.11 *************** *** 26,29 **** --- 26,30 ---- using QuantProject.ADT; using QuantProject.ADT.Optimizing.Genetic; + using QuantProject.ADT.FileManaging; using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; *************** *** 51,55 **** /// - choose the most efficient portfolio among these tickers /// </summary> ! public class RunEfficientCTOPorfolio : Script { //DateTime lastDate = DateTime.Now.Date; --- 52,57 ---- /// - choose the most efficient portfolio among these tickers /// </summary> ! [Serializable] ! public class RunEfficientCTOPorfolio : Script { //DateTime lastDate = DateTime.Now.Date; *************** *** 59,67 **** DateTime firstDate = new DateTime(2004,9,25); // ! private ReportTable reportTable; private EndOfDayDateTime startDateTime; private EndOfDayDateTime endDateTime; ! private int numIntervalDays;// number of days for the equity line graph private IHistoricalQuoteProvider historicalQuoteProvider = new HistoricalRawQuoteProvider(); --- 61,74 ---- DateTime firstDate = new DateTime(2004,9,25); // ! private string tickerGroupID; ! private int numberOfEligibleTickers; ! private int numberOfTickersToBeChosen; ! private int generationNumberForGeneticOptimizer; ! private int populationSizeForGeneticOptimizer; ! private ReportTable reportTable; private EndOfDayDateTime startDateTime; private EndOfDayDateTime endDateTime; ! //private int numIntervalDays;// number of days for the equity line graph private IHistoricalQuoteProvider historicalQuoteProvider = new HistoricalRawQuoteProvider(); *************** *** 76,88 **** private IEndOfDayTimer endOfDayTimer; ! public RunEfficientCTOPorfolio() { //this.progressBarForm = new ProgressBarForm(); this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 2002 , 1 , 1 ) , EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2002 , 1 , 20 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); ! this.numIntervalDays = 2; } #region Run --- 83,102 ---- private IEndOfDayTimer endOfDayTimer; ! public RunEfficientCTOPorfolio(string tickerGroupID, int numberOfEligibleTickers, ! int numberOfTickersToBeChosen, int generationNumberForGeneticOptimizer, ! int populationSizeForGeneticOptimizer) { //this.progressBarForm = new ProgressBarForm(); + this.tickerGroupID = tickerGroupID; + this.numberOfEligibleTickers = numberOfEligibleTickers; + this.numberOfTickersToBeChosen = numberOfTickersToBeChosen; + this.generationNumberForGeneticOptimizer = generationNumberForGeneticOptimizer; + this.populationSizeForGeneticOptimizer = populationSizeForGeneticOptimizer; this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 1999 , 1 , 1 ) , EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2004 , 10 , 31 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); ! //this.numIntervalDays = 3; } #region Run *************** *** 124,128 **** private void run_initializeEndOfDayTimerHandler() { ! this.endOfDayTimerHandler = new EndOfDayTimerHandlerCTO("STOCKMI",70,5,this.account,10); } /* --- 138,149 ---- private void run_initializeEndOfDayTimerHandler() { ! this.endOfDayTimerHandler = new EndOfDayTimerHandlerCTO(this.tickerGroupID, ! this.numberOfEligibleTickers, ! this.numberOfTickersToBeChosen, ! this.account, ! this.generationNumberForGeneticOptimizer, ! this.populationSizeForGeneticOptimizer); ! ! } /* *************** *** 172,183 **** private void checkDateForReport(Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs) { ! Report report; if(endOfDayTimingEventArgs.EndOfDayDateTime.DateTime>=this.endDateTime.DateTime ) { this.endOfDayTimer.Stop(); ! report = new Report( this.account , this.historicalQuoteProvider ); ! report.Show("CTO_Portfolio" , this.numIntervalDays , this.endDateTime , "^MIBTEL" ); ! } --- 193,209 ---- private void checkDateForReport(Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs) { ! //Report report; if(endOfDayTimingEventArgs.EndOfDayDateTime.DateTime>=this.endDateTime.DateTime ) { this.endOfDayTimer.Stop(); ! //report = new Report( this.account , this.historicalQuoteProvider ); ! //report.Show("CTO_Portfolio" , this.numIntervalDays , this.endDateTime , "^MIBTEL" ); ! ObjectArchiver.Archive(this.account, ! "C:\\Documents and Settings\\Marco\\Documenti\\ProgettiOpenSource\\Quant\\SavedAccounts\\OpenCloseScripts\\" + ! "From"+this.numberOfEligibleTickers + "Portfolio" + ! this.numberOfTickersToBeChosen + "GenNum" + ! this.generationNumberForGeneticOptimizer + ! "PopSize" + this.populationSizeForGeneticOptimizer + ".qP"); } |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:10:29
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a07_DataProviders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1365/b4_Business/a07_DataProviders Modified Files: HistoricalRawQuoteProvider.cs Log Message: Added Serializable attribute Index: HistoricalRawQuoteProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a07_DataProviders/HistoricalRawQuoteProvider.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HistoricalRawQuoteProvider.cs 9 Jan 2005 23:31:01 -0000 1.1 --- HistoricalRawQuoteProvider.cs 6 Feb 2005 20:10:18 -0000 1.2 *************** *** 31,35 **** /// Returns historical raw quotes /// </summary> ! public class HistoricalRawQuoteProvider : IHistoricalQuoteProvider { public HistoricalRawQuoteProvider() --- 31,36 ---- /// Returns historical raw quotes /// </summary> ! [Serializable] ! public class HistoricalRawQuoteProvider : IHistoricalQuoteProvider { public HistoricalRawQuoteProvider() |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:09:06
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Statistics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1115/b1_ADT/Statistics Modified Files: NormalDistribution.cs Log Message: Fixed bug: infinity is approximated by: "average + 15 * StandardDeviation" and not by "15 * StandardDeviation" - as it was previously Index: NormalDistribution.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Statistics/NormalDistribution.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NormalDistribution.cs 14 Dec 2004 21:18:05 -0000 1.1 --- NormalDistribution.cs 6 Feb 2005 20:08:55 -0000 1.2 *************** *** 47,51 **** this.average = average; this.stdDeviation = stdDeviation; ! this.infinity = 15 * stdDeviation; this.numOfIntervalsForPDFIntegralApproximation = Convert.ToInt32(25*this.infinity); --- 47,51 ---- this.average = average; this.stdDeviation = stdDeviation; ! this.infinity = this.average + 15 * stdDeviation ; this.numOfIntervalsForPDFIntegralApproximation = Convert.ToInt32(25*this.infinity); |
|
From: Glauco S. <gl...@my...> - 2005-02-06 20:07:48
|
At 08:50 PM 2/6/2005 +0100, you wrote: >E' che io ho SEMPRE usato il tortoise per fare i commit ... Ho ipotizzato che ci siano casini quando aggiungi una cartella. Quando aggiungi un file in una cartella che e' presente nel mio CVS locale, il file vien giu', ma se il file nuovo e' in una cartella nuova, allora ci sono casini. E' solo un'ipotesi "a naso"... >----- Original Message ----- >From: "Glauco Siliprandi" <gl...@my...> >To: <qua...@li...> >Sent: Saturday, February 05, 2005 7:05 PM >Subject: [Quantproject-developers] Re: [Quantproject-developers] >QuantProject/b7_Scripts/CallingReportsForRunnedScripts >ShowReportFromFile.cs,NONE,1.1 > > >> >>Tanto per cambiare... questo, l'update, non me lo tira giu'. >> >>Posso chiederti se hai usato il Tortoise? Mi sbagliero', ma c'e' qualche >>incompabilita'. >> >>At 12:07 AM 2/4/2005 +0000, you wrote: >>>Update of >>>/cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunnedScripts >>>In directory >>>sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6108/b7_Scripts/CallingReportsForRunnedScripts >>> >>>Added Files: >>> ShowReportFromFile.cs >>>Log Message: >>>Added ShowReportFromFile class to view report from file (containing at the >>>moment only serialized account). >>>The Class Position in scripts project is just temporary >>> >>>--- NEW FILE: ShowReportFromFile.cs --- >>>/* >>>QuantProject - Quantitative Finance Library >>> >>>ShowReportFromFile.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.Scripts; >>>using QuantProject.Business.Timing; >>>using QuantProject.Business.Financial.Accounting; >>>using QuantProject.Business.DataProviders; >>>using QuantProject.ADT.FileManaging; >>>using QuantProject.Presentation.Reporting.WindowsForm; >>> >>> >>>namespace QuantProject.Scripts.CallingReportsForRunnedScripts >>>{ >>> public class ShowReportFromFile >>> { >>> public ShowReportFromFile() >>> { >>> >>> } >>> >>> >>> public static void ShowReportFromSerializedAccount(string >>>serializedAccountFullPath) >>> { >>> try >>> { >>> Account account = >>>(Account)ObjectArchiver.Extract(serializedAccountFullPath); >>> >>> Report report = new Report(account, new >>>HistoricalAdjustedQuoteProvider()); >>> report.Show("CtcPortfolio",3, >>> new EndOfDayDateTime(new >>>DateTime(2000,1,20), EndOfDaySpecificTime.MarketClose), "^MIBTEL"); >>> >>> } >>> catch(System.Exception ex) >>> { >>>System.Windows.Forms.MessageBox.Show(ex.ToString()); >>> } >>> } >>> } >>>} >>> >>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>>Tool for open source databases. Create drag-&-drop reports. Save time >>>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>>Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>_______________________________________________ >>>Quantproject-developers mailing list >>>Qua...@li... >>>https://lists.sourceforge.net/lists/listinfo/quantproject-developers >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>Tool for open source databases. Create drag-&-drop reports. Save time >>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>_______________________________________________ >>Quantproject-developers mailing list >>Qua...@li... >>https://lists.sourceforge.net/lists/listinfo/quantproject-developers > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >Tool for open source databases. Create drag-&-drop reports. Save time >by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >Download a FREE copy at http://www.intelliview.com/go/osdn_nl >_______________________________________________ >Quantproject-developers mailing list >Qua...@li... >https://lists.sourceforge.net/lists/listinfo/quantproject-developers |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:06:33
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv411/b7_Scripts Modified Files: b7_Scripts.csproj Log Message: Corrected "runned" into Run ... Index: b7_Scripts.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/b7_Scripts.csproj,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** b7_Scripts.csproj 6 Feb 2005 18:13:05 -0000 1.21 --- b7_Scripts.csproj 6 Feb 2005 20:06:05 -0000 1.22 *************** *** 118,122 **** /> <File ! RelPath = "CallingReportsForRunnedScripts\ShowReportFromFile.cs" SubType = "Code" BuildAction = "Compile" --- 118,122 ---- /> <File ! RelPath = "CallingReportsForRunScripts\ShowReportFromFile.cs" SubType = "Code" BuildAction = "Compile" |
|
From: Marco M. <mi...@us...> - 2005-02-06 20:06:16
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunScripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv411/b7_Scripts/CallingReportsForRunScripts Added Files: ShowReportFromFile.cs Log Message: Corrected "runned" into Run ... --- NEW FILE: ShowReportFromFile.cs --- /* QuantProject - Quantitative Finance Library ShowReportFromFile.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.Scripts; using QuantProject.Business.Timing; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.DataProviders; using QuantProject.ADT.FileManaging; using QuantProject.Presentation.Reporting.WindowsForm; namespace QuantProject.Scripts.CallingReportsForRunScripts { public class ShowReportFromFile { public ShowReportFromFile() { } public static void ShowReportFromSerializedAccount(string serializedAccountFullPath) { try { Account account = (Account)ObjectArchiver.Extract(serializedAccountFullPath); Report report = new Report(account, new HistoricalAdjustedQuoteProvider()); report.Show("CtcPortfolio",3, new EndOfDayDateTime(new DateTime(2004,10,31), EndOfDaySpecificTime.MarketClose), "^MIBTEL"); } catch(System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.ToString()); } } } } |
|
From: Marco M. <mi...@us...> - 2005-02-06 19:55:14
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunScripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30694/CallingReportsForRunScripts Log Message: Directory /cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunScripts added to the repository |
|
From: Marco M. <mar...@li...> - 2005-02-06 19:50:19
|
E' che io ho SEMPRE usato il tortoise per fare i commit ... ----- Original Message ----- From: "Glauco Siliprandi" <gl...@my...> To: <qua...@li...> Sent: Saturday, February 05, 2005 7:05 PM Subject: [Quantproject-developers] Re: [Quantproject-developers] QuantProject/b7_Scripts/CallingReportsForRunnedScripts ShowReportFromFile.cs,NONE,1.1 > > Tanto per cambiare... questo, l'update, non me lo tira giu'. > > Posso chiederti se hai usato il Tortoise? Mi sbagliero', ma c'e' qualche > incompabilita'. > > At 12:07 AM 2/4/2005 +0000, you wrote: >>Update of >>/cvsroot/quantproject/QuantProject/b7_Scripts/CallingReportsForRunnedScripts >>In directory >>sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6108/b7_Scripts/CallingReportsForRunnedScripts >> >>Added Files: >> ShowReportFromFile.cs >>Log Message: >>Added ShowReportFromFile class to view report from file (containing at the >>moment only serialized account). >>The Class Position in scripts project is just temporary >> >>--- NEW FILE: ShowReportFromFile.cs --- >>/* >>QuantProject - Quantitative Finance Library >> >>ShowReportFromFile.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.Scripts; >>using QuantProject.Business.Timing; >>using QuantProject.Business.Financial.Accounting; >>using QuantProject.Business.DataProviders; >>using QuantProject.ADT.FileManaging; >>using QuantProject.Presentation.Reporting.WindowsForm; >> >> >>namespace QuantProject.Scripts.CallingReportsForRunnedScripts >>{ >> public class ShowReportFromFile >> { >> public ShowReportFromFile() >> { >> >> } >> >> >> public static void ShowReportFromSerializedAccount(string >> serializedAccountFullPath) >> { >> try >> { >> Account account = >> (Account)ObjectArchiver.Extract(serializedAccountFullPath); >> >> Report report = new Report(account, new >> HistoricalAdjustedQuoteProvider()); >> report.Show("CtcPortfolio",3, >> new EndOfDayDateTime(new >> DateTime(2000,1,20), EndOfDaySpecificTime.MarketClose), "^MIBTEL"); >> >> } >> catch(System.Exception ex) >> { >> System.Windows.Forms.MessageBox.Show(ex.ToString()); >> } >> } >> } >>} >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>Tool for open source databases. Create drag-&-drop reports. Save time >>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>_______________________________________________ >>Quantproject-developers mailing list >>Qua...@li... >>https://lists.sourceforge.net/lists/listinfo/quantproject-developers > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Quantproject-developers mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantproject-developers > |
|
From: Glauco S. <gla...@us...> - 2005-02-06 18:30:37
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8853 Added Files: Commission.cs Log Message: Base class for commissions --- NEW FILE: Commission.cs --- /* QuantProject - Quantitative Finance Library Commission.cs Copyright (C) 2003 Glauco Siliprandi 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.Business.Financial.Accounting; namespace QuantProject.Business.Financial.Accounting.Commissions { /// <summary> /// Base class for commissions /// </summary> public class Commission { private Transaction transaction; public virtual double Value { get { return 0.0; } } public Transaction Transaction { get { return this.transaction; } } public Commission( Transaction transaction ) { this.transaction = transaction; } } } |
|
From: Glauco S. <gla...@us...> - 2005-02-06 18:29:46
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8654/Commissions Log Message: Directory /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Commissions added to the repository |