goldenChat base source add
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.goldenchart.dto;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* Ta4j AnalysisCriterion 계산 결과 전체를 담는 DTO
|
||||
*/
|
||||
@Data @Builder @NoArgsConstructor @AllArgsConstructor
|
||||
public class BacktestAnalysisDto {
|
||||
|
||||
// ── 기본 자본 ─────────────────────────────────────────────────────────────
|
||||
double initialCapital;
|
||||
double finalEquity;
|
||||
|
||||
// ── 수익성 지표 ──────────────────────────────────────────────────────────
|
||||
/** 총 수익률 (소수, e.g. 0.152 = +15.2%) */
|
||||
double totalReturnPct;
|
||||
/** 총 손익 (금액) */
|
||||
double totalProfitLoss;
|
||||
/** 총 수익 (이익 거래 합산) */
|
||||
double grossProfit;
|
||||
/** 총 손실 (손실 거래 합산, 음수) */
|
||||
double grossLoss;
|
||||
/** 평균 거래 수익률 */
|
||||
double avgReturnPct;
|
||||
/** 손익비 (총이익 / |총손실|) */
|
||||
double profitLossRatio;
|
||||
|
||||
// ── 거래 통계 ─────────────────────────────────────────────────────────────
|
||||
int numberOfPositions;
|
||||
int numberOfWinning;
|
||||
int numberOfLosing;
|
||||
int numberOfBreakEven;
|
||||
/** 승률 0~1 */
|
||||
double winRate;
|
||||
|
||||
// ── 리스크 지표 ───────────────────────────────────────────────────────────
|
||||
/** 최대 낙폭 (음수, -0.15 = -15%) */
|
||||
double maxDrawdownPct;
|
||||
/** 최대 상승폭 */
|
||||
double maxRunupPct;
|
||||
/** 샤프 비율 */
|
||||
double sharpeRatio;
|
||||
/** 소르티노 비율 */
|
||||
double sortinoRatio;
|
||||
/** 칼마 비율 (총수익률 / |최대낙폭|) */
|
||||
double calmarRatio;
|
||||
/** Value at Risk (95%) */
|
||||
double valueAtRisk95;
|
||||
/** Expected Shortfall / CVaR */
|
||||
double expectedShortfall;
|
||||
|
||||
// ── 벤치마크 비교 ─────────────────────────────────────────────────────────
|
||||
/** 바이앤홀드 수익률 */
|
||||
double buyAndHoldReturnPct;
|
||||
/** 전략 대비 바이앤홀드 배수 (>1 이면 전략이 유리) */
|
||||
double vsBuyAndHold;
|
||||
}
|
||||
Reference in New Issue
Block a user