[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GT] SVN Commit r632 - in branches/exp: GT GT/Analyzers GT/DB GT/Docs GT/Systems Scripts Scripts/t/bin
Author: thomas
Date: 2008-06-11 07:15:33 +0200 (Wed, 11 Jun 2008)
New Revision: 632
Added:
branches/exp/GT/Docs/makepod.sh
Modified:
branches/exp/GT/Analyzers/Accumulate.pm
branches/exp/GT/Analyzers/Avg.pm
branches/exp/GT/Analyzers/AvgCosts.pm
branches/exp/GT/Analyzers/AvgGain.pm
branches/exp/GT/Analyzers/AvgLoss.pm
branches/exp/GT/Analyzers/AvgNZ.pm
branches/exp/GT/Analyzers/AvgPerformance.pm
branches/exp/GT/Analyzers/BuyAndHold.pm
branches/exp/GT/Analyzers/BuyPrice.pm
branches/exp/GT/Analyzers/CloseDate.pm
branches/exp/GT/Analyzers/ClosePrice.pm
branches/exp/GT/Analyzers/CompleteCash.pm
branches/exp/GT/Analyzers/CompleteDate.pm
branches/exp/GT/Analyzers/CompleteGain.pm
branches/exp/GT/Analyzers/CompleteValue.pm
branches/exp/GT/Analyzers/Consec.pm
branches/exp/GT/Analyzers/Costs.pm
branches/exp/GT/Analyzers/CumGain.pm
branches/exp/GT/Analyzers/CumLoss.pm
branches/exp/GT/Analyzers/DrawDown.pm
branches/exp/GT/Analyzers/Duration.pm
branches/exp/GT/Analyzers/First.pm
branches/exp/GT/Analyzers/Gain.pm
branches/exp/GT/Analyzers/GrossGain.pm
branches/exp/GT/Analyzers/InitSum.pm
branches/exp/GT/Analyzers/IonDate.pm
branches/exp/GT/Analyzers/IsGain.pm
branches/exp/GT/Analyzers/IsLoss.pm
branches/exp/GT/Analyzers/Last.pm
branches/exp/GT/Analyzers/Long.pm
branches/exp/GT/Analyzers/Losses.pm
branches/exp/GT/Analyzers/Max.pm
branches/exp/GT/Analyzers/MeanPerformance.pm
branches/exp/GT/Analyzers/Min.pm
branches/exp/GT/Analyzers/NB.pm
branches/exp/GT/Analyzers/NetGain.pm
branches/exp/GT/Analyzers/NetGainPercent.pm
branches/exp/GT/Analyzers/OpenDate.pm
branches/exp/GT/Analyzers/OpenPrice.pm
branches/exp/GT/Analyzers/PerShare.pm
branches/exp/GT/Analyzers/Performance.pm
branches/exp/GT/Analyzers/Process.pm
branches/exp/GT/Analyzers/ProfitFactor.pm
branches/exp/GT/Analyzers/ProfitFactorGT.pm
branches/exp/GT/Analyzers/Quantity.pm
branches/exp/GT/Analyzers/R4.pm
branches/exp/GT/Analyzers/RiskReturn.pm
branches/exp/GT/Analyzers/SellPrice.pm
branches/exp/GT/Analyzers/Short.pm
branches/exp/GT/Analyzers/StdTime.pm
branches/exp/GT/Analyzers/Sum.pm
branches/exp/GT/Analyzers/SumPerformance.pm
branches/exp/GT/Analyzers/Type.pm
branches/exp/GT/Analyzers/WinRatio.pm
branches/exp/GT/DB/HTTP.pm
branches/exp/GT/DB/MetaStockReader.pm
branches/exp/GT/DB/Text.pm
branches/exp/GT/Systems.pm
branches/exp/GT/Systems/Generic.pm
branches/exp/Scripts/analyze_backtest.pl
branches/exp/Scripts/anashell.pl
branches/exp/Scripts/backtest.pl
branches/exp/Scripts/backtest_many.pl
branches/exp/Scripts/backtest_multi.pl
branches/exp/Scripts/display_indicator.pl
branches/exp/Scripts/display_signal.pl
branches/exp/Scripts/graphic.pl
branches/exp/Scripts/manage_portfolio.pl
branches/exp/Scripts/scan.pl
branches/exp/Scripts/select_combination.pl
branches/exp/Scripts/t/bin/output_indicator.pl
Log:
Formatting changes in pod documentation in order to allow generation
of latex doc using the newly added script GT/Docs/makepod.sh. Some
improvements in writing.
Modified: branches/exp/GT/Analyzers/Accumulate.pm
===================================================================
--- branches/exp/GT/Analyzers/Accumulate.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Accumulate.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,24 +18,26 @@
=head1 NAME
- GT::Analyzers::Accumulate - Accumulates the Days of arg1
+GT::Analyzers::Accumulate - Accumulates the values of an array.
-=head1 DESCRIPTION
+=head2 DESCRIPTION
-Accumulates the values of the array that is given as arg1.
+Accumulates the values of the array that is given as parameter.
+For example, if the parameter array consists of the values (1,2,3,4),
+the result is (1,3,6,10).
-This means if the array consists of the values (1,2,3,4) the result is
-(1,3,6,10).
-
=head2 Parameters
-First argument: Array reference to be accumulated
+=over
+=item * Array reference to be accumulated
+=back
+
=head2 Return
-Returns an array, not considering first and last parameter.
+Returns an array.
=cut
Modified: branches/exp/GT/Analyzers/Avg.pm
===================================================================
--- branches/exp/GT/Analyzers/Avg.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Avg.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,18 +18,21 @@
=head1 NAME
- GT::Analyzers::Avg - Calculates the Average of arg1
+GT::Analyzers::Avg - Calculates the Average of arg1
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculates the Average of arg1
=head2 Parameters
-First argument: Array reference to be averaged
+=over
+=item * Array reference to be averaged
+=back
+
=head2 Return
Returns an array, not considering first and last parameter.
Modified: branches/exp/GT/Analyzers/AvgCosts.pm
===================================================================
--- branches/exp/GT/Analyzers/AvgCosts.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/AvgCosts.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -20,9 +20,9 @@
=head1 NAME
- GT::Analyzers::AvgCosts - Average Costs per trade
+GT::Analyzers::AvgCosts - Average Costs per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean costs of the portfolio
Modified: branches/exp/GT/Analyzers/AvgGain.pm
===================================================================
--- branches/exp/GT/Analyzers/AvgGain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/AvgGain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,18 +18,22 @@
=head1 NAME
- GT::Analyzers::AvgGain - Average Gain per trade
+GT::Analyzers::AvgGain - Average Gain per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
This analyzer calculates the mean of the gains.
=head2 Parameters
-First parameter: Cumulated Gain
+=over
-Second parameter: Number of Gains
+=item * Cumulated Gain
+=item * Number of Gains
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/AvgLoss.pm
===================================================================
--- branches/exp/GT/Analyzers/AvgLoss.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/AvgLoss.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,19 +18,23 @@
=head1 NAME
- GT::Analyzers::AvgLoss - Average Loss per trade
+GT::Analyzers::AvgLoss - Average Loss per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
This analyzer calculates the mean of the losses.
=head2 Parameters
-First parameter: Cumulated Loss
+=over
-Second parameter: Number of Losses
+=item * Cumulated Loss
+=item * Number of Losses
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/AvgNZ.pm
===================================================================
--- branches/exp/GT/Analyzers/AvgNZ.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/AvgNZ.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,17 +18,21 @@
=head1 NAME
- GT::Analyzers::AvgNZ - Calculates the Average
+GT::Analyzers::AvgNZ - Calculates the Average
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculates the Average of Arg1, but only of the days where Arg1 is
non-zero.
=head2 Parameters
-First argument: Array reference to be averaged
+=over
+=item * Array reference to be averaged
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/AvgPerformance.pm
===================================================================
--- branches/exp/GT/Analyzers/AvgPerformance.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/AvgPerformance.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::AvgPerformance - Average Performance per trade
+GT::Analyzers::AvgPerformance - Average Performance per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean performance of the portfolio
Modified: branches/exp/GT/Analyzers/BuyAndHold.pm
===================================================================
--- branches/exp/GT/Analyzers/BuyAndHold.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/BuyAndHold.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -19,9 +19,9 @@
=head1 NAME
- GT::Analyzers::AvgCosts - Average Costs per trade
+GT::Analyzers::AvgCosts - Average Costs per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean performance of the portfolio
Modified: branches/exp/GT/Analyzers/BuyPrice.pm
===================================================================
--- branches/exp/GT/Analyzers/BuyPrice.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/BuyPrice.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::BuyPrice - The price for which the stock was bought
+GT::Analyzers::BuyPrice - The price for which the stock was bought
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The price for which the stock was bought
Modified: branches/exp/GT/Analyzers/CloseDate.pm
===================================================================
--- branches/exp/GT/Analyzers/CloseDate.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CloseDate.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::CloseDate - The date where the position was closed
+GT::Analyzers::CloseDate - The date where the position was closed
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The date where the position was closed.
Modified: branches/exp/GT/Analyzers/ClosePrice.pm
===================================================================
--- branches/exp/GT/Analyzers/ClosePrice.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/ClosePrice.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::ClosePricce - The price on the closing date
+GT::Analyzers::ClosePricce - The price on the closing date
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The price on the closing date.
Modified: branches/exp/GT/Analyzers/CompleteCash.pm
===================================================================
--- branches/exp/GT/Analyzers/CompleteCash.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CompleteCash.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::CompleteCash - Returns the cash-part of the evaluation-history
+GT::Analyzers::CompleteCash - Returns the cash-part of the evaluation-history
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Returns the cash-part of the evaluation-history
Modified: branches/exp/GT/Analyzers/CompleteDate.pm
===================================================================
--- branches/exp/GT/Analyzers/CompleteDate.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CompleteDate.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::CompleteDate - Returns all dates of the evaulation history
+GT::Analyzers::CompleteDate - Returns all dates of the evaulation history
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Returns all dates of the evaulation history
Modified: branches/exp/GT/Analyzers/CompleteGain.pm
===================================================================
--- branches/exp/GT/Analyzers/CompleteGain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CompleteGain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::CompleteGain - The gain of the evaluation history
+GT::Analyzers::CompleteGain - The gain of the evaluation history
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The gain of the evaluation history
Modified: branches/exp/GT/Analyzers/CompleteValue.pm
===================================================================
--- branches/exp/GT/Analyzers/CompleteValue.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CompleteValue.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Complete Value - The values of the portfolio history
+GT::Analyzers::Complete Value - The values of the portfolio history
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The values of the portfolio history
Modified: branches/exp/GT/Analyzers/Consec.pm
===================================================================
--- branches/exp/GT/Analyzers/Consec.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Consec.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,16 +18,20 @@
=head1 NAME
- GT::Analyzers::Consec - Maximum of consecutive nonzero-values
+GT::Analyzers::Consec - Maximum of consecutive nonzero-values
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculates the Average of Arg1
=head2 Parameters
-First argument: Array reference to be averaged
+=over
+=item * Array reference to be averaged
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/Costs.pm
===================================================================
--- branches/exp/GT/Analyzers/Costs.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Costs.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Costs - Costs per trade
+GT::Analyzers::Costs - Costs per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The costs per trade.
Modified: branches/exp/GT/Analyzers/CumGain.pm
===================================================================
--- branches/exp/GT/Analyzers/CumGain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CumGain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::CumGain - Cummulative Gain
+GT::Analyzers::CumGain - Cummulative Gain
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Cummulative Gain
Modified: branches/exp/GT/Analyzers/CumLoss.pm
===================================================================
--- branches/exp/GT/Analyzers/CumLoss.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/CumLoss.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::CumLoss - Cummulative Loss
+GT::Analyzers::CumLoss - Cummulative Loss
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Cummulative Loss
Modified: branches/exp/GT/Analyzers/DrawDown.pm
===================================================================
--- branches/exp/GT/Analyzers/DrawDown.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/DrawDown.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::DrwaDown - The Drawdown of the portfolio
+GT::Analyzers::DrwaDown - The Drawdown of the portfolio
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The Drawdown of the portfolio: The maximum Drawdown can be calculated
as: {A:Min {A:DrawDown}}
@@ -29,11 +29,11 @@
=over
-=item NetGain
+=item * NetGain
-=item Initial Sum of Cash
+=item * Initial Sum of Cash
-=item Maximum net gain
+=item * Maximum net gain
=back
Modified: branches/exp/GT/Analyzers/Duration.pm
===================================================================
--- branches/exp/GT/Analyzers/Duration.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Duration.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Duration - Duration of the trades
+GT::Analyzers::Duration - Duration of the trades
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Duration of the trades.
Modified: branches/exp/GT/Analyzers/First.pm
===================================================================
--- branches/exp/GT/Analyzers/First.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/First.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,16 +18,20 @@
=head1 NAME
- GT::Analyzers::First - First value of the arrray #arg1
+GT::Analyzers::First - First value of the arrray #arg1
-=head1 DESCRIPTION
+=head2 DESCRIPTION
First value of the arrray #arg1
=head2 Parameters
-First argument: Array reference
+=over
+=item * Array reference
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/Gain.pm
===================================================================
--- branches/exp/GT/Analyzers/Gain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Gain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Gain - Gain of each trade
+GT::Analyzers::Gain - Gain of each trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Gain of each trade
Modified: branches/exp/GT/Analyzers/GrossGain.pm
===================================================================
--- branches/exp/GT/Analyzers/GrossGain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/GrossGain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::GrossGain - The gross gain
+GT::Analyzers::GrossGain - The gross gain
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The gross gain
Modified: branches/exp/GT/Analyzers/InitSum.pm
===================================================================
--- branches/exp/GT/Analyzers/InitSum.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/InitSum.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::InitSum - The initial amount of cash
+GT::Analyzers::InitSum - The initial amount of cash
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The initial amount of cash
Modified: branches/exp/GT/Analyzers/IonDate.pm
===================================================================
--- branches/exp/GT/Analyzers/IonDate.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/IonDate.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -19,9 +19,9 @@
=head1 NAME
- GT::Analyzers::AvgCosts - Average Costs per trade
+GT::Analyzers::AvgCosts - Average Costs per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean performance of the portfolio
Modified: branches/exp/GT/Analyzers/IsGain.pm
===================================================================
--- branches/exp/GT/Analyzers/IsGain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/IsGain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::AvgCosts - Average Costs per trade
+GT::Analyzers::AvgCosts - Average Costs per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean performance of the portfolio
Modified: branches/exp/GT/Analyzers/IsLoss.pm
===================================================================
--- branches/exp/GT/Analyzers/IsLoss.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/IsLoss.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::IsLoss - Boolean value: True if it is a loosing trade
+GT::Analyzers::IsLoss - Boolean value: True if it is a loosing trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Boolean value: True if it is a loosing trade
Modified: branches/exp/GT/Analyzers/Last.pm
===================================================================
--- branches/exp/GT/Analyzers/Last.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Last.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,16 +18,20 @@
=head1 NAME
- GT::Analyzers::Last - Last value of array #arg1
+GT::Analyzers::Last - Last value of array #arg1
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Last value of array #arg1
=head2 Parameters
-First argument: Array reference
+=over
+=item * Array reference
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/Long.pm
===================================================================
--- branches/exp/GT/Analyzers/Long.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Long.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Long - Boolean value: True if trade is long
+GT::Analyzers::Long - Boolean value: True if trade is long
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Boolean value: True if trade is long
Modified: branches/exp/GT/Analyzers/Losses.pm
===================================================================
--- branches/exp/GT/Analyzers/Losses.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Losses.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Losses - The losses of the trades
+GT::Analyzers::Losses - The losses of the trades
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The losses of the trades
Modified: branches/exp/GT/Analyzers/Max.pm
===================================================================
--- branches/exp/GT/Analyzers/Max.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Max.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,16 +18,20 @@
=head1 NAME
- GT::Analyzers::Max - Calculates the Maximum of Arg1
+GT::Analyzers::Max - Calculates the Maximum of Arg1
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculates the Maximum of Arg1
=head2 Parameters
-First argument: Array reference
+=over
+=item * Array reference
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/MeanPerformance.pm
===================================================================
--- branches/exp/GT/Analyzers/MeanPerformance.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/MeanPerformance.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::MeanPerformace - The Mean Performance of a Portfolio
+GT::Analyzers::MeanPerformace - The Mean Performance of a Portfolio
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean performance of the portfolio
Modified: branches/exp/GT/Analyzers/Min.pm
===================================================================
--- branches/exp/GT/Analyzers/Min.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Min.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,16 +18,20 @@
=head1 NAME
- GT::Analyzers::Min - Calculates the Minimum of Arg1
+GT::Analyzers::Min - Calculates the Minimum of Arg1
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculates the Minimum of Arg1
=head2 Parameters
-First argument: Array reference
+=over
+=item * Array reference
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/NB.pm
===================================================================
--- branches/exp/GT/Analyzers/NB.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/NB.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::NB - Number of trades
+GT::Analyzers::NB - Number of trades
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Number of trades
Modified: branches/exp/GT/Analyzers/NetGain.pm
===================================================================
--- branches/exp/GT/Analyzers/NetGain.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/NetGain.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::NetGain - The net gain of the positions
+GT::Analyzers::NetGain - The net gain of the positions
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The net gain of the positions
Modified: branches/exp/GT/Analyzers/NetGainPercent.pm
===================================================================
--- branches/exp/GT/Analyzers/NetGainPercent.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/NetGainPercent.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::AvgCosts - Average Costs per trade
+GT::Analyzers::AvgCosts - Average Costs per trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The mean performance of the portfolio
Modified: branches/exp/GT/Analyzers/OpenDate.pm
===================================================================
--- branches/exp/GT/Analyzers/OpenDate.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/OpenDate.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::OpenDate - The date where the trade was opened
+GT::Analyzers::OpenDate - The date where the trade was opened
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The date where the trade was opened
Modified: branches/exp/GT/Analyzers/OpenPrice.pm
===================================================================
--- branches/exp/GT/Analyzers/OpenPrice.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/OpenPrice.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::OpenPrice - The price at the opening
+GT::Analyzers::OpenPrice - The price at the opening
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The price at the opening
Modified: branches/exp/GT/Analyzers/PerShare.pm
===================================================================
--- branches/exp/GT/Analyzers/PerShare.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/PerShare.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,16 +18,20 @@
=head1 NAME
- GT::Analyzers::PerShare - Normalizes a value per share of a position
+GT::Analyzers::PerShare - Normalizes a value per share of a position
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Normalizes a value per share of a position
=head2 Parameters
-First argument: Array reference to be normalized
+=over
+=item * Array reference to be normalized
+
+=back
+
=cut
sub initialize {
Modified: branches/exp/GT/Analyzers/Performance.pm
===================================================================
--- branches/exp/GT/Analyzers/Performance.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Performance.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Performance - The Performance of the trades
+GT::Analyzers::Performance - The Performance of the trades
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The Performance of the trades
@@ -28,9 +28,9 @@
=over
-=item The net gain in percent
+=item * The net gain in percent
-=item The price ath the opening of a trade
+=item * The price ath the opening of a trade
=back
Modified: branches/exp/GT/Analyzers/Process.pm
===================================================================
--- branches/exp/GT/Analyzers/Process.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Process.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -38,9 +38,9 @@
=head1 NAME
- GT::Analyzers::Process
+GT::Analyzers::Process
-=head1 DESCRIPTION
+=head2 DESCRIPTION
This module offes all those functions that are needed by the analyzers
shell to interactively analyze and test portfolios.
Modified: branches/exp/GT/Analyzers/ProfitFactor.pm
===================================================================
--- branches/exp/GT/Analyzers/ProfitFactor.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/ProfitFactor.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Profitfactor - Calculates the profitfactor
+GT::Analyzers::Profitfactor - Calculates the profitfactor
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculate the Profitfactor by dividing the sum of the gains by the sum
of the losses.
@@ -29,9 +29,9 @@
=over
-=item Sum of the Gains
+=item * Sum of the Gains
-=item Sum of the Lossse
+=item * Sum of the Lossse
=back
Modified: branches/exp/GT/Analyzers/ProfitFactorGT.pm
===================================================================
--- branches/exp/GT/Analyzers/ProfitFactorGT.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/ProfitFactorGT.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Profitfactor - Calculates the profitfactor
+GT::Analyzers::Profitfactor - Calculates the profitfactor
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calculate the Profitfactor by dividing the average of the gains by the
average of the losses.
@@ -29,9 +29,9 @@
=over
-=item Average of the Gains
+=item * Average of the Gains
-=item Average of the Lossse
+=item * Average of the Lossse
=back
Modified: branches/exp/GT/Analyzers/Quantity.pm
===================================================================
--- branches/exp/GT/Analyzers/Quantity.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Quantity.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,11 +18,11 @@
=head1 NAME
- GT::Analyzers::Quantity - The quantitiy of shares
+GT::Analyzers::Quantity - The quantitiy of shares
-=head1 DESCRIPTION
+=head2 DESCRIPTION
-The quantitiy of shares
+The quantity of shares
=head2 Parameters
Modified: branches/exp/GT/Analyzers/R4.pm
===================================================================
--- branches/exp/GT/Analyzers/R4.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/R4.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,11 +18,11 @@
=head1 NAME
- GT::Analyzers::AvgCosts - Average Costs per trade
+GT::Analyzers::R4 - Risk of Ruin
-=head1 DESCRIPTION
+=head2 DESCRIPTION
-The mean performance of the portfolio
+Calculate Vince's "R4" (Risk Of Ruin).
=head2 Parameters
Modified: branches/exp/GT/Analyzers/RiskReturn.pm
===================================================================
--- branches/exp/GT/Analyzers/RiskReturn.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/RiskReturn.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::RiskReturn - Caluclates the Risk-/Return-Ratio
+GT::Analyzers::RiskReturn - Caluclates the Risk-/Return-Ratio
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Caluclates the Risk-/Return-Ratio
Modified: branches/exp/GT/Analyzers/SellPrice.pm
===================================================================
--- branches/exp/GT/Analyzers/SellPrice.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/SellPrice.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::SellPrice - The price for which the position was sold
+GT::Analyzers::SellPrice - The price for which the position was sold
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The price for which the position was sold
Modified: branches/exp/GT/Analyzers/Short.pm
===================================================================
--- branches/exp/GT/Analyzers/Short.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Short.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Short - True if it is a short trade
+GT::Analyzers::Short - True if it is a short trade
-=head1 DESCRIPTION
+=head2 DESCRIPTION
True if it is a short trade
Modified: branches/exp/GT/Analyzers/StdTime.pm
===================================================================
--- branches/exp/GT/Analyzers/StdTime.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/StdTime.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -20,9 +20,9 @@
=head1 NAME
- GT::Analyzers::StdTime - Normalizes the value #arg1 per year
+GT::Analyzers::StdTime - Normalizes the value #arg1 per year
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Normalizes the value #arg1 per year
Modified: branches/exp/GT/Analyzers/Sum.pm
===================================================================
--- branches/exp/GT/Analyzers/Sum.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Sum.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Sum - Summarizes the array #arg1
+GT::Analyzers::Sum - Summarizes the array #arg1
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Summarizes the array #arg1
Modified: branches/exp/GT/Analyzers/SumPerformance.pm
===================================================================
--- branches/exp/GT/Analyzers/SumPerformance.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/SumPerformance.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::SumPerformance - The Sum of the Performance
+GT::Analyzers::SumPerformance - The Sum of the Performance
-=head1 DESCRIPTION
+=head2 DESCRIPTION
The Sum of the Performance
Modified: branches/exp/GT/Analyzers/Type.pm
===================================================================
--- branches/exp/GT/Analyzers/Type.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/Type.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::Type - String: long if long and short if short
+GT::Analyzers::Type - String: long if long and short if short
-=head1 DESCRIPTION
+=head2 DESCRIPTION
String: long if long and short if short
Modified: branches/exp/GT/Analyzers/WinRatio.pm
===================================================================
--- branches/exp/GT/Analyzers/WinRatio.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Analyzers/WinRatio.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -18,9 +18,9 @@
=head1 NAME
- GT::Analyzers::WinRatio - Calcuates the WinRatio
+GT::Analyzers::WinRatio - Calcuates the WinRatio
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Calcuates the WinRatio
Modified: branches/exp/GT/DB/HTTP.pm
===================================================================
--- branches/exp/GT/DB/HTTP.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/DB/HTTP.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -60,6 +60,7 @@
do not need to be included in this value.. The header_lines default value is 0.
=item DB::HTTP::format 0|1|2|3 (default is 3)
+
The format of the date/time string. Valid values are:
0 - yyyy-mm-dd hh:nn:ss (the time string is optional)
1 - US Format (month before day, any format understood by Date::Calc)
Modified: branches/exp/GT/DB/MetaStockReader.pm
===================================================================
--- branches/exp/GT/DB/MetaStockReader.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/DB/MetaStockReader.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -432,9 +432,5 @@
1;
=back
-=head1 COPYRIGHT
-
-Copyright 2003-2005 Tournedouet Yannick.
-
=cut
Modified: branches/exp/GT/DB/Text.pm
===================================================================
--- branches/exp/GT/DB/Text.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/DB/Text.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -106,6 +106,8 @@
Indexes are 0 based. The default volume index is 4.
+=back
+
=head2 new()
Create a new DB object used to retrieve quotes from a directory
@@ -214,6 +216,13 @@
return get_prices($self, $code, $timeframe, -1);
}
+=pod
+
+=head2 $db->has_code($code)
+
+Tests whether the symbol $code exists in the data base.
+
+=cut
sub has_code {
my ($self, $code) = @_;
my $extension = $self->{'extension'};
Added: branches/exp/GT/Docs/makepod.sh
===================================================================
--- branches/exp/GT/Docs/makepod.sh (rev 0)
+++ branches/exp/GT/Docs/makepod.sh 2008-06-11 05:15:33 UTC (rev 632)
@@ -0,0 +1,16 @@
+#!bash
+
+# Run from GT/Docs directory
+
+clear=$1
+
+if [ $clear ]; then
+ clear='-preamble \\let\\clearpage=\% '
+else
+ clear=''
+fi
+
+cd ../
+pod2latex -out Docs/gt-pod.tex -full -modify -preamble \\documentclass{article} -preamble \\usepackage[T1]{fontenc} -preamble \\usepackage{textcomp}\\usepackage{makeidx}\\makeindex -preamble \\begin{document} $clear -postamble \\end{document} `find . -name \*.pm -print`
+cd ../Scripts
+pod2latex -out ../GT/Docs/scripts-pod.tex -full -modify -preamble \\documentclass{article} -preamble \\usepackage[T1]{fontenc} -preamble \\usepackage{textcomp}\\usepackage{makeidx}\\makeindex -preamble \\begin{document} $clear -postamble \\end{document} `find . -name \*.pl -print`
Property changes on: branches/exp/GT/Docs/makepod.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/exp/GT/Systems/Generic.pm
===================================================================
--- branches/exp/GT/Systems/Generic.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Systems/Generic.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -16,63 +16,53 @@
@ISA = qw(GT::Systems);
@NAMES = ("Generic[#*]");
-=head1 Generic System module
+=head1 Generic System
- a system runs on two signals: long and short
+=head2 DESCRIPTION
- these terms imply buying shares when the long signal is triggered
- and selling shares short when the short signal is triggered. in
- either case a new position is thus opened (or maybe added to)
- for the security that caused the signal.
+A system runs on two signals: long and short.
- a generic system description requires two signals, the first
- must define the long signal, the second defines the short signal.
+These terms imply buying shares when the long signal is triggered
+and selling shares short when the short signal is triggered. in
+either case a new position is thus opened (or maybe added to)
+for the security that caused the signal.
- out on a limb here -- a system description can specify only
- one long and one short signal
+A generic system description requires two signals, the first
+must define the long signal, the second defines the short signal.
- nb: the short signal will not necessarily close a position
- opened by a prior long signal. open position management is
- controlled by a close strategy.
+The short signal will not necessarily close a position
+opened by a prior long signal. Open position management is
+controlled by a close strategy.
- according to GT::Systems a signal is acted upon in the following
- day (timeframe). if a position is opened (long or short) closing
- that position is controlled by a close strategy (CS). therefore,
- most system descriptions will also include a close strategy
- description.
+According to GT::Systems, a signal is acted upon in the following
+day (timeframe). If a position is opened (long or short) closing
+that position is controlled by a close strategy (CS). Therefore,
+most full system descriptions will also include a close strategy
+description.
- system description can specify multiple close strategies
+Full system descriptions can specify multiple close strategies,
+multiple trade filters, and multiple money management (MM)
+strategies.
- system description can specify multiple money management (MM)
- strategies
+=head2 Generic System Examples
- how does OrderFactory (OF) fit in with system description?
-
-
-=head1 Generic System Examples
-
SY:Generic \
{S:Generic:CrossOverUp {I:SMA 20 {I:Prices CLOSE}} {I:SMA 60 {I:Prices CLOSE}}} \
{S:Generic:CrossOverDown {I:SMA 20 {I:Prices CLOSE}} {I:SMA 60 {I:Prices CLOSE}}} \
| TF:OneTrade \
| CS:OppositeSignal
- the CrossOverUp signal denotes the buy condition
- the CrossOverDown signal denotes the sell condition
+The CrossOverUp signal denotes the buy condition.
+The CrossOverDown signal denotes the sell condition.
- notice that the close strategy explicitly specifies that the short
- signal is also used to close open positions, and conversely
- short positions are closed with the long signal.
+Notice that the close strategy explicitly specifies that the short
+signal is also used to close open positions, and conversely
+short positions are closed with the long signal.
- the trade filter (TF) (see perldoc ../GT/TradeFilters.pm) will limit
- the number of open positions (either long or short) to one, however
- it will allow a new open position and a closed postion in the same timeframe.
-
- system descriptions can specify multiple trade filters
+The trade filter (TF) will limit the number of open positions (either
+long or short) to one, however it will allow a new open position and a
+closed postion in the same timeframe.
-
- SY:Generic inherits new from GT::Systems::
-
=cut
Modified: branches/exp/GT/Systems.pm
===================================================================
--- branches/exp/GT/Systems.pm 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/GT/Systems.pm 2008-06-11 05:15:33 UTC (rev 632)
@@ -19,9 +19,9 @@
=head1 NAME
-GT::Systems -
+GT::Systems
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Trading systems are systems that decide what to buy and sell at which
prices and so on.
Modified: branches/exp/Scripts/analyze_backtest.pl
===================================================================
--- branches/exp/Scripts/analyze_backtest.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/analyze_backtest.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -30,23 +30,24 @@
=over 4
-=item --set=SETNAME
+=item --set=<setname>
Restricts the analysis to a specific set. A set is simply an identifier that you put on data when you add it to the "backtests" directory (refer to your options file for the location of this directory) when using backtest_many.pl. Using the --set option you can differentiate between the different backtest results in your directory.
=item --template=<template file>
Output is generated using the indicated HTML::Mason component.
-For Example, --template="analyze_backtest.mpl"
+For Example, C<< --template="analyze_backtest.mpl" >>.
The template directory is defined as Template::directory in the options file.
Each template can be predefined by including it into the options file
-For example, Template::analyze_backtest analyze_backtest.mpl
+For example,
+ Template::analyze_backtest analyze_backtest.mpl
+
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
=back
Modified: branches/exp/Scripts/anashell.pl
===================================================================
--- branches/exp/Scripts/anashell.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/anashell.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -27,132 +27,142 @@
The command help shows you a comprehensive summary of the available
commands:
-anashell> help
+ anashell> help
By typing set without a parameter it will show you the current settings:
-anashell> set
-Settings:
- expert => 1
- code => 13000
- system => Systems::Generic {S:Generic:CrossOverUp {I:SMA 20} {I:SMA 60}}
- {S:Generic:CrossOverDown {I:SMA 20} {I:SMA 60}} broker =>
- InteractiveBrokers first => auto tf => OneTrade full => 0 last => auto
- mm [0] => Basic cs => OppositeSignal
+ anashell> set
+ Settings:
+ expert => 1
+ code => 13000
+ system => Systems::Generic {S:Generic:CrossOverUp {I:SMA 20} {I:SMA 60}}
+ {S:Generic:CrossOverDown {I:SMA 20} {I:SMA 60}} broker =>
+ InteractiveBrokers first => auto tf => OneTrade full => 0 last => auto
+ mm [0] => Basic cs => OppositeSignal
Most of the settings are very easy to understand:
expert => 1
- If set to 1 every command that can't be interpreted by the internal
- parser is interpreted by perl.
+If set to 1 every command that can't be interpreted by the internal
+parser is interpreted by perl.
+
code => 13000
- The code :)
+The market to be analyzed.
+
system => Systems::Generic {S:Generic:CrossOverUp {I:SMA 20} {I:SMA 60}}
{S:Generic:CrossOverDown {I:SMA 20} {I:SMA 60}}
- The System to test
+The System to test.
+
broker => InteractiveBrokers
- The broker
+The broker
+
first => auto
last => auto
- Can be set to a date; auto results in the same settings as in
- backtest.pl
+Can be set to a date; auto results in the same settings as in
+backtest.pl
+
tf => OneTrade
mm [0] => Basic
cs => OppositeSignal
- Tradefilters, Money-Management and Closing-Strategies
+Tradefilters, Money-Management and Closing-Strategies
+
full => 0
- Test the full history?
+Test the full history.
+
For our backtest we want to test the full history so we use:
-anashell> set full 1
+ anashell> set full 1
And we add one more closing-strategy by using the following command:
-anashell> set +cs Stop::KeepRunUp 10
+ anashell> set +cs Stop::KeepRunUp 10
(set cs[1] Xxxxx would have changed the second array element)
After this we start the backtest...
-anashell> btest
-Tested ... ok in 104 seconds
+ anashell> btest
+ Tested ... ok in 104 seconds
...and view the result:
-anashell> report report_summary.ash
+ anashell> report report_summary.ash
By using the HTML::Mason-framework you can generate every report you
want...
Now we can save the system to a directory
-anashell> save TEST /tmp
+ anashell> save TEST /tmp
+
Saved TEST in /tmp...
So that we can load it the next time we start a session:
-anashell> load TEST /tmp
-Loaded Portfolio TEST...
+ anashell> load TEST /tmp
+ Loaded Portfolio TEST...
If we don't know the name of our system we can list all systems in the
directory:
-anashell> list /tmp
- ==> SY:Generic {S:Generic:CrossOverUp {I:SMA 20 {I:Prices CLOSE}} {I:SMA
- 60 {I:Prices CLOSE}}} {S:Generic:CrossOverDown {I:SMA 20 {I:Prices
- CLOSE}} {I:SMA 60 {I:Prices CLOSE}}}|TF:OneTrade
- 50|CS:OppositeSignal|CS:Stop:KeepRunUp 10
- --> 13000
+ anashell> list /tmp
+ ==> SY:Generic {S:Generic:CrossOverUp {I:SMA 20 {I:Prices CLOSE}} {I:SMA
+ 60 {I:Prices CLOSE}}} {S:Generic:CrossOverDown {I:SMA 20 {I:Prices
+ CLOSE}} {I:SMA 60 {I:Prices CLOSE}}}|TF:OneTrade
+ 50|CS:OppositeSignal|CS:Stop:KeepRunUp 10
+ --> 13000
Now let's do some analysis on the backtest:
First I would like to know the costs for each trade
-anashell> calc_array {A:OpenDate} {A:Costs}
-Number OpenDate[] Costs[]
- [ 0] 1993-05-13 20.76
- [ 1] 1993-07-01 22.65
+ anashell> calc_array {A:OpenDate} {A:Costs}
+ Number OpenDate[] Costs[]
+ [ 0] 1993-05-13 20.76
+ [ 1] 1993-07-01 22.65
+
[...]
- [ 34] 2002-01-17 20.3
+ [ 34] 2002-01-17 20.3
+
But we can also calculate the average cost of one trade:
-anashell> calc {A:Avg {A:Costs}}
-20.1568571428571
+ anashell> calc {A:Avg {A:Costs}}
+ 20.1568571428571
- you see it is the same as using an indicator...
Now let's do some graphics (make sure you have R (www.r-project.org)
installed):
-anashell> @gain = calc_array("{A:NetGain}")
-anashell> r_hist( \
AT
gain )
+ anashell> @gain = calc_array("{A:NetGain}")
+ anashell> r_hist( \
AT
gain )
You can also have a look at the distribution of the gains over time:
-anashell> r_bar( \
AT
gain )
+ anashell> r_bar( \
AT
gain )
Or we create a second array and see if there is a correlation between the
Duration of a trade and its gain...
-anashell> @duration = calc_array("{A:Duration}")
-r_corr( \
AT
duration, \
AT
gain )
+ anashell> @duration = calc_array("{A:Duration}")
+ r_corr( \
AT
duration, \
AT
gain )
Now let's leave the program and save the history for the next session:
-anashell> bye
-Exiting Olf's Analyzer...
-Save settings? [Y/n]: Y
+ anashell> bye
+ Exiting Olf's Analyzer...
+ Save settings? [Y/n]: Y
=head2 Requirements
- This module needs Term::ReadLine to process the interactive commands.
+This module needs Term::ReadLine to process the interactive commands.
=cut
Modified: branches/exp/Scripts/backtest.pl
===================================================================
--- branches/exp/Scripts/backtest.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/backtest.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -29,12 +29,8 @@
GT::Conf::load();
-=head1 ./backtest.pl [ options ] <code>
+=head1 ./backtest.pl [ options ] { <code> | <system_alias> <code> | <full_system_name> <code> }
-=head1 ./backtest.pl [ options ] <system_alias> <code>
-
-=head1 ./backtest.pl [ options ] "<full_system_name>" <code>
-
=head2 Description
Backtest will run a backtest of a system on the indicated code.
@@ -42,6 +38,7 @@
You can either describe the system using options, give a full system
name, or you can give a system alias. An alias is defined in the
configuration file with entries of the form
+
Aliases::Global::<alias_name> <full_system_name>.
The full system name consists of a set of properties, such as trade
@@ -49,23 +46,31 @@
separated by vertical bars ("|"). Multiple properties of the same
type can be defined, e.g., there could be a set of close strategies.
For example,
+
System:ADX 30 | TradeFilters:Trend 2 5 | MoneyManagement:Normal
+
defines a system based on the "ADX" system, using a trend following trade
filter "Trend", and the "Normal" money management.
The following abbreviations are supported:
-Systems = SY
-CloseStrategy = CS
-TradeFilters = TF
-MoneyManagement = MM
-OrderFactory = OF
-Signals = S
-Indicators = I
-Generic = G
+ Systems = SY
+ CloseStrategy = CS
+ TradeFilters = TF
+ MoneyManagement = MM
+ OrderFactory = OF
+ Signals = S
+ Indicators = I
+ Generic = G
+
Another example of a full system name is
+
SY:TFS|CS:SY:TFS|CS:Stop:Fixed 4|MM:VAR.
+Note that if the <full_system_name> or <system_alias> contains
+characters treated as separators by the shell, such as spaces or
+vertical bars, they must be surrounded by quotes.
+
=head2 Options
Backtest provide a set of options, so that you can use a combination
@@ -132,22 +137,24 @@
loaded to satisfy dependencies, for example, correct results cannot be obtained.
This option is effective only for certain data base modules and ignored otherwise.
-=item --template="backtest.mpl"
+=item --template=<filename>
Output is generated using the indicated HTML::Mason component.
-For Example, --template="backtest.mpl"
+For Example, C<< --template="backtest.mpl" >>
The template directory is defined as Template::directory in the options file.
Each template can be predefined by including it into the options file
-For example, Template::backtest backtest.mpl
+For example,
+ Template::backtest backtest.mpl
+
=item --html
Output is generated in html
-=item --graph="filename.png"
+=item --graph=<filename>
-Generate a graph of your portfolio value over the time of the backtest and
-display it in the generated html.
+Generate a PNG graph of your portfolio value over the time of the backtest and
+display it in the generated html, if needed.
=item --display-trades
@@ -155,40 +162,44 @@
trades last long enough otherwise your graph will be overwhelmed with
unsignificant symbols.
-=item --store="portfolio.xml"
+=item --store=<filename>
-Store the resulting portfolio in the indicated file.
+Store the resulting portfolio in the indicated XML file.
-=item --broker="NoCosts"
+=item --broker=<brokername>
Calculate commissions and annual account charge, if applicable, using
-GT::Brokers::<broker_name> as broker.
+C<< GT::Brokers::<broker_name> >> as broker.
-=item --system="<system_name>"
+=item --system=<system_name>
-use the GT::Systems::<system_name> as the source of buy/sell orders.
+use C<< GT::Systems::<system_name> >> as the source of buy/sell orders.
-=item --money-management="<money_management_name>"
+=item --money-management=<money_management_name>
-use the GT::MoneyManagement::<money_management_name> as money management system.
+use C<< GT::MoneyManagement::<money_management_name> >> as money management system.
-=item --trade-filter="<filter_name>"
+=item --trade-filter=<filter_name>
-use the GT::TradeFilters::<filter_name> as a trade filter.
+use C<< GT::TradeFilters::<filter_name> >> as a trade filter.
-=item --order-factory="<order_factory_name>"
+=item --order-factory=<order_factory_name>
-use GT::OrderFactory::<order_factory_name> as an order factory.
+use C<< GT::OrderFactory::<order_factory_name> >> as an order factory.
-=item --close-strategy="<close_strategy_name>"
+=item --close-strategy=<close_strategy_name>
-use GT::CloseStrategy::<close_strategy_name> as a close strategy.
+use C<< GT::CloseStrategy::<close_strategy_name> >> as a close strategy.
-=item --set=SETNAME
+=item --set=<setname>
-Stores the backtest results in the "backtests" directory (refer to your options file for the location of this directory) using the set name SETNAME. Use the --set option of analyze_backtest.pl to differentiate between the different backtest results in your directory.
+Stores the backtest results in the "backtests" directory (refer to
+your options file for the location of this directory) using the set
+name C<< <setname> >>. Use the --set option of analyze_backtest.pl to
+differentiate between the different backtest results in your
+directory.
-=item --output-directory=DIRNAME
+=item --output-directory=<dirname>
Override the "backtests" directory in the options file.
@@ -197,34 +208,21 @@
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C <<--option=DB::Text::format=0>>
sets the format used to parse markets via the DB::Text module to 0.
=back
=head2 Examples
-=over 4
+ ./backtest.pl TFS 13000
-=item
+ ./backtest.pl --full TFS 13000
-./backtest.pl TFS 13000
+ ./backtest.pl --close-strategy="Systems::TFS" --close-strategy="Stop::Fixed 6" --money-management="VAR" --money-management="OrderSizeLimit" --system="TFS" --broker="SelfTrade Int�al" 13000
-=item
+ ./backtest.pl --broker="SelfTrade Int��al" "SY:TFS|CS:SY:TFS|CS:Stop:Fixed 6|MM:VAR|MM:OrderSizeLimit" 13000
-./backtest.pl --full TFS 13000
-
-=item
-
-./backtest.pl --close-strategy="Systems::TFS" --close-strategy="Stop::Fixed 6" --money-management="VAR" --money-management="OrderSizeLimit" --system="TFS" --broker="SelfTrade Int�al" 13000
-
-=item
-
-./backtest.pl --broker="SelfTrade Int��al" "SY:TFS|CS:SY:TFS|CS:Stop:Fixed 6|MM:VAR|MM:OrderSizeLimit" 13000
-
-=back
-
=cut
# Manage options
Modified: branches/exp/Scripts/backtest_many.pl
===================================================================
--- branches/exp/Scripts/backtest_many.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/backtest_many.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -36,6 +36,7 @@
The <system file> contains one line per defined system, where each
system is defined by its full system name or by an alias. An alias is
defined in the configuration file with entries of the form
+
Aliases::Global::<alias_name> <full_system_name>.
The full system name consists of a set of properties, such as trade
@@ -43,21 +44,25 @@
separated by vertical bars ("|"). Multiple properties of the same
type can be defined, e.g., there could be a set of close strategies.
For example,
+
System:ADX 30 | TradeFilters:Trend 2 5 | MoneyManagement:Normal
+
defines a system based on the "ADX" system, using a trend following trade
filter "Trend", and the "Normal" money management.
The following abbreviations are supported:
-Systems = SY
-CloseStrategy = CS
-TradeFilters = TF
-MoneyManagement = MM
-OrderFactory = OF
-Signals = S
-Indicators = I
-Generic = G
+ Systems = SY
+ CloseStrategy = CS
+ TradeFilters = TF
+ MoneyManagement = MM
+ OrderFactory = OF
+ Signals = S
+ Indicators = I
+ Generic = G
+
Another example of a full system name is
+
SY:TFS|CS:SY:TFS|CS:Stop:Fixed 4|MM:VAR.
=head2 Options
@@ -122,40 +127,38 @@
loaded to satisfy dependencies, for example, correct results cannot be obtained.
This option is effective only for certain data base modules and ignored otherwise.
-=item --broker="NoCosts"
+=item --broker=<broker_name>
Calculate commissions and annual account charge, if applicable, using
-GT::Brokers::<broker_name> as broker.
+C<< GT::Brokers::<broker_name> >> as broker.
-=item --nbprocess=2
+=item --nbprocess=<n>
If you want to start two (or more) backtests in parallel (useful for machines with several CPUs for example).
-=item --set=SETNAME
+=item --set=<setname>
-Stores the backtest results in the "backtests" directory (refer to your options file for the location of this directory) using the set name SETNAME. Use the --set option of analyze_backtest.pl to differentiate between the different backtest results in your directory.
+Stores the backtest results in the "backtests" directory (refer to
+your options file for the location of this directory) using the set
+name C<< <setname> >>. Use the --set option of analyze_backtest.pl to
+differentiate between the different backtest results in your
+directory.
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
=back
=head2 Examples
-=over 4
+ ./backtest_many.pl ../Listes/fr/CAC40 ../BackTest/HCB.txt --output-dir=../BackTest/ --set=HCB --full
-=item
-./backtest_many.pl ../Listes/fr/CAC40 ../BackTest/HCB.txt --output-dir=../BackTest/ --set=HCB --full
-
-=back
-
=head2 Example of system description
-SY:TFS 50 7|CS:SY:TFS 50|CS:Stop:Fixed 6|MM:VAR 10 2|MM:PositionSizeLimit 100
+ SY:TFS 50 7|CS:SY:TFS 50|CS:Stop:Fixed 6|MM:VAR 10 2|MM:PositionSizeLimit 100
=cut
Modified: branches/exp/Scripts/backtest_multi.pl
===================================================================
--- branches/exp/Scripts/backtest_multi.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/backtest_multi.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -37,6 +37,7 @@
The <system file> contains one line per defined system, where each
system is defined by its full system name or by an alias. An alias is
defined in the configuration file with entries of the form
+
Aliases::Global::<alias_name> <full_system_name>.
The full system name consists of a set of properties, such as trade
@@ -44,21 +45,25 @@
separated by vertical bars ("|"). Multiple properties of the same
type can be defined, e.g., there could be a set of close strategies.
For example,
+
System:ADX 30 | TradeFilters:Trend 2 5 | MoneyManagement:Normal
+
defines a system based on the "ADX" system, using a trend following trade
filter "Trend", and the "Normal" money management.
The following abbreviations are supported:
-Systems = SY
-CloseStrategy = CS
-TradeFilters = TF
-MoneyManagement = MM
-OrderFactory = OF
-Signals = S
-Indicators = I
-Generic = G
+ Systems = SY
+ CloseStrategy = CS
+ TradeFilters = TF
+ MoneyManagement = MM
+ OrderFactory = OF
+ Signals = S
+ Indicators = I
+ Generic = G
+
Another example of a full system name is
+
SY:TFS|CS:SY:TFS|CS:Stop:Fixed 4|MM:VAR.
=head2 Options
@@ -123,36 +128,34 @@
loaded to satisfy dependencies, for example, correct results cannot be obtained.
This option is effective only for certain data base modules and ignored otherwise.
-=item --broker="NoCosts"
+=item --broker=<broker_name>
Calculate commissions and annual account charge, if applicable, using
-GT::Brokers::<broker_name> as broker.
+C<< GT::Brokers::<broker_name> >> as broker.
-=item --set=SETNAME
+=item --set=<setname>
-Stores the backtest results in the "backtests" directory (refer to your options file for the location of this directory) using the set name SETNAME. Use the --set option of analyze_backtest.pl to differentiate between the different backtest results in your directory.
+Stores the backtest results in the "backtests" directory (refer to
+your options file for the location of this directory) using the set
+name C<< <setname> >>. Use the --set option of analyze_backtest.pl to
+differentiate between the different backtest results in your
+directory.
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
=back
=head2 Examples
-=over 4
+ ./backtest_many.pl ../Listes/fr/CAC40 ../BackTest/HCB.txt --output-dir=../BackTest/ --set=HCB --full
-=item
-./backtest_many.pl ../Listes/fr/CAC40 ../BackTest/HCB.txt --output-dir=../BackTest/ --set=HCB --full
-
-=back
-
=head2 Example of system description
-SY:TFS 50 7|CS:SY:TFS 50|CS:Stop:Fixed 6|MM:VAR 10 2|MM:PositionSizeLimit 100
+ SY:TFS 50 7|CS:SY:TFS 50|CS:Stop:Fixed 6|MM:VAR 10 2|MM:PositionSizeLimit 100
=cut
Modified: branches/exp/Scripts/display_indicator.pl
===================================================================
--- branches/exp/Scripts/display_indicator.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/display_indicator.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -101,21 +101,20 @@
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
=back
=head2 Examples
-./display_indicator.pl I:SMA IBM 100
+ ./display_indicator.pl I:SMA IBM 100
-./display_indicator.pl --full I:RSI 13000
+ ./display_indicator.pl --full I:RSI 13000
args (if any) are passed to the new call that will create the indicator.
-./display_indicator.pl --nb 10 I:EMA IBM 120
+ ./display_indicator.pl --nb 10 I:EMA IBM 120
=cut
Modified: branches/exp/Scripts/display_signal.pl
===================================================================
--- branches/exp/Scripts/display_signal.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/display_signal.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -103,8 +103,7 @@
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
=back
@@ -133,13 +132,13 @@
=head2 Examples
-./display_signal.pl S:Prices:GapUp IBM
+ ./display_signal.pl S:Prices:GapUp IBM
Test for the GapUp signal in symbol IBM.
By default, use daily data, and display the last available 200 periods.
-./display_signal.pl --full S:Generic:CrossOverUp EURUSD {I:EMA 50} {I:EMA 200}
+ ./display_signal.pl --full S:Generic:CrossOverUp EURUSD {I:EMA 50} {I:EMA 200}
Test for the EMA50 crossing over up EMA200.
Do the test over the full available history data.
Modified: branches/exp/Scripts/graphic.pl
===================================================================
--- branches/exp/Scripts/graphic.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/graphic.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -31,8 +31,8 @@
=head2 Synopsis
-./graphic.pl [ --timeframe=timeframe ] [ --nb-item=100 ] \
- [ --start=2005-06-01 ] [ --end=2006-01-01 ] \
+ ./graphic.pl [ --timeframe=timeframe ] [ --nb-item=100 ] \
+ [ --start=2005-06-01 ] [ --end=2006-01-01 ] \
[ --type=candle|candlevol|candlevolplace|barchart|line|none ] [ --volume ]
[ --volume-height=150 ] [ --title="Daily Chart" ] \
[ --width=200 ] [ --height=230 ] [ --logarithmic ] \
@@ -59,8 +59,8 @@
To plot overlays, simply add them to the graphic. For instance:
---add="Curve(Indicators::EMA 50, blue)"
---add="Curve(Indicators::EMA 200, red)"
+ --add="Curve(Indicators::EMA 50, blue)"
+ --add="Curve(Indicators::EMA 200, red)"
To plot indicators in a different zone, first create a new-zone, then add the indicators:
@@ -119,7 +119,9 @@
If the title contains a %c, this is replaced by the <code>, if it contains
%n, this is replaced by the long name of the <code>. See also
~/.gt/sharenames, which contains lines of the form
+
<code>\t<long name>
+
mapping a market to its long name.
=item Histogram(<datasource>, [color])
@@ -275,31 +277,30 @@
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
-=item Configuration-File ( --file=conf )
+=item --file=<conf>
With this option, additional parameters are read from the
-configurationfile conf. Each line in this file corresponds to a
+configurationfile C<< <conf> >>. Each line in this file corresponds to a
command line parameter. Lines starting with # are ignored.
=back
=head2 Examples
-./graphic.pl --add="Switch-Zone(0)" \
- --add="Curve(Indicators::SMA 38, [0,0,255])" \
- --add="Curve(Indicators::SMA 100, [0,255,0])" \
- --add="Curve(Indicators::SMA 200, [255,0,0])" \
- --title="Daily history of %c" \
- 13000 > test.png
+ ./graphic.pl --add="Switch-Zone(0)" \
+ --add="Curve(Indicators::SMA 38, [0,0,255])" \
+ --add="Curve(Indicators::SMA 100, [0,255,0])" \
+ --add="Curve(Indicators::SMA 200, [255,0,0])" \
+ --title="Daily history of %c" \
+ 13000 > test.png
-./graphic.pl --add="Curve(Indicators::EMA 5,[255,0,0])" \
- --add="Curve(Indicators::EMA 20,[0,0,255])" \
- --add="BuySellArrows(SY::Generic {S::Generic::CrossOverUp {I:EMA 5} {I:EMA 20}} {S::Generic::CrossOverDown {I:EMA 5} {I:EMA 20}} )" \
- 13000 > test.png
+ ./graphic.pl --add="Curve(Indicators::EMA 5,[255,0,0])" \
+ --add="Curve(Indicators::EMA 20,[0,0,255])" \
+ --add="BuySellArrows(SY::Generic {S::Generic::CrossOverUp {I:EMA 5} {I:EMA 20}} {S::Generic::CrossOverDown {I:EMA 5} {I:EMA 20}} )" \
+ 13000 > test.png
=cut
Modified: branches/exp/Scripts/manage_portfolio.pl
===================================================================
--- branches/exp/Scripts/manage_portfolio.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/manage_portfolio.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -52,26 +52,31 @@
./manage_portfolio.pl <portfolio> file <filename>
./manage_portfolio.pl <portfolio> db
- where
- <portfolio> is filename of portfolio to use. it can be a non-existent
- file, in which case it will be created
+where
- <quantity> <price> are numeric values for <share> which is the
- appropriate stock symbol or cusip or other identifier
+=over
- <date> is optional, the date the transaction happened on. if not
+=item * C<< <portfolio> >> is the filename of portfolio to use. it can
+be a non-existent file, in which case it will be created
+
+=item * C<< <quantity> <price> >> are numeric values for C<< <share>
+>> which is the appropriate stock symbol or cusip or other identifier
+
+=item * C<< <date> >> is optional, the date the transaction happened on. if not
supplied the default value for 'today' will be supplied. preferred GT
format for dates is 'YYYY-MM-DD'.
- <source> is optional, a text string, it can be used to note the source
- of the stock transaction. typically an internal GT used field. for
- individual transactions <source> can be set via the --source='string'
- option.
+=item * C<< <source> >> is optional, a text string, it can be used to
+note the source of the stock transaction. typically an internal GT
+used field. for individual transactions <source> can be set via the
+C<< --source='string' >> option.
- <broker> name of broker module to use. see ../GT/Brokers/. there is
- no error checking. if the supplied broker module fails to exist the
- portfolio will be flawed.
+=item * C<< <broker> >> name of broker module to use. see
+../GT/Brokers/. there is no error checking. if the supplied broker
+module fails to exist the portfolio will be flawed.
+=back
+
=head1 OPTIONS
=over
@@ -137,12 +142,15 @@
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
+=back
+
=head1 COMMANDS
+=over
+
=item create
creates <portfolio> and optionally set <initial-sum> available funds.
@@ -172,26 +180,26 @@
Specifies the name of a file which contains a list of
-bought <quantity> <share> <price> [ <date> <source> ]
+ bought <quantity> <share> <price> [ <date> <source> ]
and
-sold <quantity> <share> <price> [ <date> <source> ]
+ sold <quantity> <share> <price> [ <date> <source> ]
commands, one per line. This allows you to submit multiple bought/sold
commands in a single instance.
=item db
-reads beancounter database portfolio table and creates <portfolio> from it.
+Reads beancounter database portfolio table and creates <portfolio> from it.
-negative stock quantities are considered sells, <source> is derived from
+Negative stock quantities are considered sells, <source> is derived from
the 'type' column. currency is ignored, as GT seems to do.
-since the beancounter portfolio really doesn't have necessary
+Since the beancounter portfolio really doesn't have necessary
functionality to manage closed positions it is probably best to manage
sells in the GT portfolio using command line or command file features
-provided here. in addition, by not introducing negative stock quantities
+provided here. In addition, by not introducing negative stock quantities
in the beancounter portfolio table you will also avoid tickling bugs
and messing up the report formats with the unexpected negative quantity
value.
@@ -208,26 +216,24 @@
The first parameter is a filename of a portfolio. The name is supposed to
be relative to the portfolio directory which is $HOME/.gt/portfolio in
Unix but can be overriden with the configuration item
-GT::Portfolio::Directory. If it doesn't exist, it will try in the local
+C<< GT::Portfolio::Directory >>. If it doesn't exist, it will try in the local
directory.
-=head1 BUGS (or maybe just rough edges (in my opinion))
+=head1 Improvement suggestions
-ha! i fixed this next bit
+=over
-really should be a usage mode, invoked with args -h* | -? | -: and since
-the program requires a command, any instantiation without a valid one.
+=item * Needs to do a better job of checking input values for bought/sold operations or needs to provide a way of completely removing a bad entry
-Needs to do a better job of checking input values for bought/sold operations
-or
-needs to provide a way of completely removing a bad entry
+=item * Might also be nice to provide a couple of output modes; say
+one to generate a file that can used as input for the
-might also be nice to provide a couple of output modes; say one to generate
-a file that can used as input for the
./manage_portfolio.pl <portfolio> file <filename>
-capability
-and one to generate a textualized version of the portfolio, if that makes sense.
+capability and one to generate a textualized version of the portfolio.
+
+=back
+
=cut
# check for plea for usage
Modified: branches/exp/Scripts/scan.pl
===================================================================
--- branches/exp/Scripts/scan.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/scan.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -36,7 +36,7 @@
=head1 SYNOPSIS
-./scan.pl [ options ] <market file> <date> <system file> [ <system file> ... ]
+ ./scan.pl [ options ] <market file> <date> <system file> [ <system file> ... ]
=head1 DESCRIPTION
@@ -55,38 +55,35 @@
Output can be either text (default) or html.
-<market file> format:
+=over
-=over 4
+=item <market file> format:
stock or index symbols one per line
-=back
+=item <date>
-<date>
-
the date to perform the analysis on. the date string can be in any format
that Date::Manip (if installed) can parse or the defacto gt standard date
format (YYYY-MM-DD HH:MM:SS) where time is optional
-<system file> format:
+=item <system file> format:
-=over 4
-
One or more GT::Signals or GT::Systems descriptions each on a separate line.
The descriptions have the form of a signal or system name, followed by its
arguments.
Example:
+
S:Generic:And {S:Generic:CrossOverUp {I:SMA 5} {I:SMA 20}} {S:Generic:Increase {I:ADX}}
-
Description files can be formatted using the symbol '\' as the
line continuation symbol. This symbol must appear as the last character
on the line before the trailing line terminator (in unix that's
a '\n' character). No whitespace must appear between the \ and the newline.
Example:
+
S:Generic:And \
{S:Generic:CrossOverUp {I:SMA 5} {I:SMA 20}} \
{S:Generic:Increase {I:ADX}}
@@ -96,6 +93,7 @@
the entire is effectively commented out.
Example:
+
# the following signal description is commented out
#S:Generic:And {S:Generic:Above {I:Prices} {I:EMA 30}} \
{S:Generic:Above {I:Prices} {I:EMA 150}}
@@ -183,8 +181,7 @@
=item --options=<key>=<value>
A configuration option (typically given in the options file) in the
-form of a key=value pair. For example,
- --option=DB::Text::format=0
+form of a key=value pair. For example, C<< --option=DB::Text::format=0 >>
sets the format used to parse markets via the DB::Text module to 0.
=back
@@ -194,12 +191,14 @@
To scan for all stocks that are trading above both their 30 day and 150 day EMAs
create a system file containing this GT::Signals description (as a single line)
-S:Generic:And {S:Generic:Above {I:Prices} {I:EMA 30}} {S:Generic:Above {I:Prices} {I:EMA 150}}
+ S:Generic:And {S:Generic:Above {I:Prices} {I:EMA 30}} \
+ {S:Generic:Above {I:Prices} {I:EMA 150}}
To scan for all stocks that are trading below both their 30 day and 150 day EMAs
create a system file containing this GT::Signals description (as a single line)
-S:Generic:And {S:Generic:Below {I:Prices} {I:EMA 30}} {S:Generic:Below {I:Prices} {I:EMA 150}}
+ S:Generic:And {S:Generic:Below {I:Prices} {I:EMA 30}} \
+ {S:Generic:Below {I:Prices} {I:EMA 150}}
=cut
@@ -473,34 +472,37 @@
=head2 Dates
- If the user has Date::Manip installed it allows the use of date strings
- that can be parsed by Date::Manip in addition the to defacto standard
- date-time format accepted by GT (YYYY-MM-DD HH:MM:SS) time part is optional
+If the user has Date::Manip installed it allows the use of date strings
+that can be parsed by Date::Manip in addition the to defacto standard
+date-time format accepted by GT (YYYY-MM-DD HH:MM:SS) time part is optional
- Date::Manip is not required, without it users cannot use short-cuts to
- specify date strings. such short cuts include
+Date::Manip is not required, without it users cannot use short-cuts to
+specify date strings. such short cuts include
+
--start '6 months ago'
--end 'today'
- Date string checking includes verifying the date string format
- is valid and the date is a valid date (and time if provided)
+Date string checking includes verifying the date string format
+is valid and the date is a valid date (and time if provided)
- Errors will be displayed and the script will terminate.
+Errors will be displayed and the script will terminate.
- The script also validates that the dates specified are consistent
- with respect to their purpose (--start is earlier than --end etc)
+The script also validates that the dates specified are consistent
+with respect to their purpose (--start is earlier than --end etc)
- Finally, appropriate timeframe conversion is performed so the user
- need not convert command line date strings from the day time to
- say week or month as it will be done automagically.
+Finally, appropriate timeframe conversion is performed so the user
+need not convert command line date strings from the day time to
+say week or month as it will be done automagically.
- Usage examples:
+Usage examples:
- with market_file (a file) containing the next 2 lines:
+With market_file (a file) containing the next 2 lines:
+
JAVA
AAPL
- with system_file (a file) containing the next 6 lines:
+with system_file (a file) containing the next 6 lines:
+
# example system_file
#
# todays price close was above open
@@ -508,43 +510,55 @@
S:Generic:Above { I:Prices CLOSE } { I:Prices OPEN }
# end of system_file
- with Date::Manip installed
+with Date::Manip installed
+
% scan.pl --timeframe day --start '6 months ago' --end 'today' market_file \
'today' system_file
- prints
+prints
+
Signal: S:Generic:Above {I:Prices CLOSE} {I:Prices OPEN}
AAPL - APPLE INC
- replace day with week and you will (should) get:
+Replace day with week and you will (should) get:
Signal: S:Generic:Above {I:Prices CLOSE} {I:Prices OPEN}
AAPL - APPLE INC
JAVA - SUN MICROSYS INC
+without Date::Manip you will need to use:
- without Date::Manip you will need to use:
% scan.pl --timeframe day --start 2007-04-24 --end 2007-10-24 market_file \
2007-10-24 system_file
+
or
+
% scan.pl --timeframe week --start 2007-04-24 --end 2007-10-24 market_file \
2007-10-24 system_file
- and should get the same results respectively
+and should get the same results respectively
+
=head2 "Bad system call" failure on cygwin
If you are using cygwin on Windows to run GT, and you encounter
a "Bad system call" error when running scan.pl, you need to enable
cygserver. cygserver is a utility that provides cygwin applications
with persistent services. See
+
http://www.cygwin.com/cygwin-ug-net/using-cygserver.html
+
for more detail. The first time you use cygserver, execute
+
/usr/bin/cygserver-config
+
to configure the service (there are many options but the above should
suffice, see the manual for more). You can then invoke the service
automatically through windows, or use
+
net start cygserver
+
to do so. You must also set the CYGWIN environment variable to 'server':
+
CYGWIN=server
export CYGWIN
Modified: branches/exp/Scripts/select_combination.pl
===================================================================
--- branches/exp/Scripts/select_combination.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/select_combination.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -16,15 +16,19 @@
GT::Conf::load();
-=head2 select_combination.pl [ --limit-ratio <min_ratio_perf/draw_down> ]
+=head1 select_combination.pl
+
+=head2 Synopsis
+
+ select_combination.pl [ --limit-ratio <min_ratio_perf/draw_down> ]
[ --limit-performance <min_perf> ]
[ --set <set> ]
-Display a list of the best "code <-> system" combination possible.
+Display a list of the best "code / system" combination possible.
It selects the system with highest ration "performance / maw_draw_down".
You can decide to exclude some system if they have a ration less than a
-minimum ration by using --limit-ration, you can also exclude systems
-if they have a performance less than a minimum given by --limit-performance.
+minimum ration by using C<< --limit-ratio >>, you can also exclude systems
+if they have a performance less than a minimum given by C<< --limit-performance >>.
=cut
my $set = '';
Modified: branches/exp/Scripts/t/bin/output_indicator.pl
===================================================================
--- branches/exp/Scripts/t/bin/output_indicator.pl 2008-06-10 05:57:12 UTC (rev 631)
+++ branches/exp/Scripts/t/bin/output_indicator.pl 2008-06-11 05:15:33 UTC (rev 632)
@@ -16,16 +16,6 @@
use GT::Eval;
use Getopt::Long;
-=head1 ./test_indicator.pl [ --full ] [ --last-record ] [ --verbose ] <indicatorname> <code> [args...]
-
-Examples:
-./test_indicator.pl SMA IBM [100]
-./test_indicator.pl --full RSI 13000
-
-Args are passed to the new call that will create the indicator.
-
-=cut
-
# Get all options
my ($code, $with_interval) = ('', 1);
GetOptions('code=s' => \$code, "interval!" => \$with_interval);