jp.sf.orangesignal.trading.stats
クラス AbstractStats

java.lang.Object
  上位を拡張 jp.sf.orangesignal.trading.stats.AbstractStats
すべての実装されたインタフェース:
Serializable
直系の既知のサブクラス:
WinLossStats

public abstract class AbstractStats
extends Object
implements Serializable

パフォーマンス統計情報の基底クラスを提供します。

作成者:
杉澤 浩二
関連項目:
直列化された形式

フィールドの概要
protected  double commission
          手数料を保持します。
protected  int count
          回数を保持します。
protected  double endingCapital
          最終資金を保持します。
protected  double grossSales
          売上を保持します。
protected  int hold
          保有期間を保持します。
protected  double initialCapital
          初期資金を保持します。
protected  int maxConsecutiveCount
          最大連続回数を保持します。
protected  double maxDrawdown
          最大ドローダウンを保持します。
protected  double maxGrossLoss
          最大損失を保持します。
protected  double maxGrossProfit
          最大利益を保持します。
protected  int maxHold
          最大保有期間を保持します。
protected  double netProfit
          損益を保持します。
protected  double slippage
          スリッページを保持します。
protected  LinkedList<Trade> tradeList
          トレードのリストを保持します。
 
コンストラクタの概要
protected AbstractStats()
          デフォルトコンストラクタです。
  AbstractStats(LinkedList<Position> positions, double initialCapital, boolean discard)
          ポジション情報のリストと初期資金を指定してこのクラクを構築するコンストラクタです。
 
メソッドの概要
 double getAverage(double value)
          回数における指定された値の平均値を返します。
 double getAverageHold()
          平均保有期間を返します。
 double getAverageNetProfit()
          平均損益を返します。
 double getBuyAndHoldNetProfit()
          推奨されていません。 
 double getCommission()
          手数料を返します。
 int getCount()
          回数を返します。
 double getEndingCapital()
          最終資金を返します。
 double getGrossSales()
          売上を返します。
 int getHold()
          保有期間を返します。
 double getInitialCapital()
          初期資金を返します。
 int getMaxConsecutiveCount()
          最大連続回数を返します。
 double getMaxDrawdown()
          最大ドローダウンを返します。
 double getMaxGrossLoss()
          最大損失を返します。
 double getMaxGrossProfit()
          最大利益を返します。
 int getMaxHold()
          最大保有期間を返します。
 double getNetProfit()
          損益を返します。
 double getPercent(double amount)
          指定された価格に対しての百分率を返します。
 double getPercentAverageNetProfit()
          平均損益率を返します。
 double getPercentCommission()
          手数料率を返します。
 double getPercentMaxDrawdown()
          最大ドローダウン率を返します。
 double getPercentMaxGrossLoss()
          最大損失率を返します。
 double getPercentMaxGrossProfit()
          最大利益率を返します。
 double getPercentNetProfit()
          損益率を返します。
 double getSharpeRatio()
          シャープレシオを返します。
 double getSlippage()
          スリッページを返します。
 LinkedList<Trade> getTradeList()
          トレードのリストを返します。
protected abstract  boolean isStatistics(Position position)
          指定されたポジション情報が、このクラスの統計情報の対象であるかどうかを返します。
protected  void statistics(LinkedList<Position> positions, double initialCapital, boolean discard)
          指定されたポジション情報のリストを解析して、このクラスの統計情報を設定します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

tradeList

protected LinkedList<Trade> tradeList
トレードのリストを保持します。


initialCapital

protected double initialCapital
初期資金を保持します。


endingCapital

protected double endingCapital
最終資金を保持します。


count

protected int count
回数を保持します。


maxConsecutiveCount

protected int maxConsecutiveCount
最大連続回数を保持します。


hold

protected int hold
保有期間を保持します。


maxHold

protected int maxHold
最大保有期間を保持します。


grossSales

protected double grossSales
売上を保持します。


commission

protected double commission
手数料を保持します。


slippage

protected double slippage
スリッページを保持します。


netProfit

protected double netProfit
損益を保持します。


maxGrossProfit

protected double maxGrossProfit
最大利益を保持します。


maxGrossLoss

protected double maxGrossLoss
最大損失を保持します。


maxDrawdown

protected double maxDrawdown
最大ドローダウンを保持します。

コンストラクタの詳細

AbstractStats

protected AbstractStats()

デフォルトコンストラクタです。

このコンストラクタはサブクラスを実装する開発者向けに提供しています。


AbstractStats

public AbstractStats(LinkedList<Position> positions,
                     double initialCapital,
                     boolean discard)
ポジション情報のリストと初期資金を指定してこのクラクを構築するコンストラクタです。

パラメータ:
positions - ポジション情報のリスト
initialCapital - 初期資金
discard - トレード情報のリストを破棄するかどうか
メソッドの詳細

statistics

protected void statistics(LinkedList<Position> positions,
                          double initialCapital,
                          boolean discard)

指定されたポジション情報のリストを解析して、このクラスの統計情報を設定します。

実装は、ポジション毎に isStatistics(Position) を呼出して統計対象のポジションであるかどうか確認します。

パラメータ:
positions - ポジション情報のリスト
initialCapital - 初期資金
discard - トレード情報のリストを破棄するかどうか

isStatistics

protected abstract boolean isStatistics(Position position)

指定されたポジション情報が、このクラスの統計情報の対象であるかどうかを返します。

パラメータ:
position - ポジション情報
戻り値:
指定されたポジション情報が、統計情報の対象である場合は true それ以外の場合は false

getTradeList

public LinkedList<Trade> getTradeList()
トレードのリストを返します。

戻り値:
トレードのリスト

getBuyAndHoldNetProfit

@Deprecated
public double getBuyAndHoldNetProfit()
推奨されていません。 


getInitialCapital

public double getInitialCapital()
初期資金を返します。

戻り値:
初期資金

getEndingCapital

public double getEndingCapital()
最終資金を返します。

戻り値:
最終資金

getPercent

public double getPercent(double amount)

指定された価格に対しての百分率を返します。

パラメータ:
amount - 価格
戻り値:
指定された価格に対しての百分率

getCount

public int getCount()
回数を返します。

戻り値:
対象ポジションの発生回数

getAverage

public double getAverage(double value)

回数における指定された値の平均値を返します。

パラメータ:
value - 値
戻り値:
平均値

getMaxConsecutiveCount

public int getMaxConsecutiveCount()
最大連続回数を返します。

戻り値:
最大連続回数

getHold

public int getHold()
保有期間を返します。

戻り値:
保有期間

getMaxHold

public int getMaxHold()
最大保有期間を返します。

戻り値:
最大保有期間

getAverageHold

public double getAverageHold()
平均保有期間を返します。

戻り値:
平均保有期間

getGrossSales

public double getGrossSales()
売上を返します。

戻り値:
売上

getSharpeRatio

public double getSharpeRatio()
シャープレシオを返します。

戻り値:
シャープレシオ

getCommission

public double getCommission()
手数料を返します。

戻り値:
手数料

getPercentCommission

public double getPercentCommission()
手数料率を返します。

戻り値:
手数料率

getSlippage

public double getSlippage()
スリッページを返します。

戻り値:
スリッページ

getNetProfit

public double getNetProfit()
損益を返します。

戻り値:
損益

getPercentNetProfit

public double getPercentNetProfit()
損益率を返します。

戻り値:
損益率

getAverageNetProfit

public double getAverageNetProfit()
平均損益を返します。

戻り値:
平均損益

getPercentAverageNetProfit

public double getPercentAverageNetProfit()
平均損益率を返します。

戻り値:
平均損益率

getMaxGrossProfit

public double getMaxGrossProfit()
最大利益を返します。

戻り値:
最大利益

getPercentMaxGrossProfit

public double getPercentMaxGrossProfit()
最大利益率を返します。

戻り値:
最大利益率

getMaxGrossLoss

public double getMaxGrossLoss()
最大損失を返します。

戻り値:
最大損失

getPercentMaxGrossLoss

public double getPercentMaxGrossLoss()
最大損失率を返します。

戻り値:
最大損失率

getMaxDrawdown

public double getMaxDrawdown()
最大ドローダウンを返します。

戻り値:
最大ドローダウン

getPercentMaxDrawdown

public double getPercentMaxDrawdown()
最大ドローダウン率を返します。

戻り値:
最大ドローダウン率


Copyright © 2006-2009 OrangeSignal.com. All Rights Reserved.