-
Notifications
You must be signed in to change notification settings - Fork 2
[BE] [FEAT] 백테스팅 보조지표 추가 #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
The head ref may contain hidden characters: "20260115_#181_\uBC31\uD14C\uC2A4\uD305_\uBCF4\uC870\uC9C0\uD45C_\uCD94\uAC00"
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7c600d4
[BE] [FEAT] 보조지표 5종 추가
cksdid202 981951d
[BE] [FEAT] StrategyOperand DTO 필드에 파라미터 상세 설명(@Schema) 추가
cksdid202 7d5ad85
[BE] [FEAT] 전략 유형별(추세, 모멘텀, 변동성 등) 요청 JSON 예시 5종 추가
cksdid202 0d4395a
[BE] [FIX] Controller RequestBody 바인딩 오류 수정 (Swagger 어노테이션 충돌 해결)
cksdid202 12b7c54
[BE] [FIX] .yml 파일 prod로 수정
cksdid202 297f94f
[BE] [FEAT] priceField 필드 설명에 Volume 추가
cksdid202 eeb6762
[BE] [FIX] Swagger의 RequestBody import를 제거 (import 충돌 문제)
cksdid202 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 21 additions & 20 deletions
41
backend/src/main/java/org/sejongisc/backend/backtest/dto/StrategyOperand.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,41 @@ | ||
| package org.sejongisc.backend.backtest.dto; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import lombok.AllArgsConstructor; | ||
| import java.util.Map; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * 전략 조건의 개별 항 (Operand) | ||
| * 예: SMA(20), 종가(Close), 30(상수) | ||
| */ | ||
| @Getter | ||
| @NoArgsConstructor | ||
| @Setter | ||
| public class StrategyOperand { | ||
|
|
||
| @Schema(description = "항의 타입: \"indicator\", \"price\", \"const\"") | ||
| private String type; | ||
| @Schema(description = "유형 (price: 가격데이터, const: 상수, indicator: 보조지표)", example = "indicator") | ||
| private String type; // 'price', 'const', 'indicator' | ||
|
|
||
| @Schema(description = "type == \"indicator\" 일 때의 지표 코드 (예: \"SMA\", \"RSI\", \"MACD\")") | ||
| @Schema(description = "지표 코드 (SMA, EMA, RSI, MACD, BB, STOCH, CCI, ATR, ADX)", example = "BB") | ||
| private String indicatorCode; | ||
|
|
||
| @Schema(description = "type == \"price\" 일 때의 가격 필드 (예: \"Close\", \"Open\", \"High\", \"Low\", \"Volume\")") | ||
| @Schema(description = "가격 기준 (Close, Open, High, Low, Volume)", example = "Close") | ||
| private String priceField; | ||
|
|
||
| @Schema(description = "type == \"const\" 일 때의 상수 값 (예: 30, 0.02)") | ||
| private BigDecimal constantValue; | ||
| @Schema(description = "상수 값 (type이 const일 때 사용)", example = "30") | ||
| private Double constantValue; | ||
|
|
||
| @Schema(description = "지표의 출력값 (예: \"value\", \"macd\", \"signal\", \"hist\")") | ||
| @Schema(description = """ | ||
| 지표별 결과값 선택 (다중 출력 지표용): | ||
| - BB (볼린저밴드): upper, middle, lower | ||
| - MACD: macd, signal, hist | ||
| - STOCH (스토캐스틱): k, d | ||
| - 나머지 단일 지표는 null 혹은 생략 가능 | ||
| """, example = "lower") | ||
| private String output; | ||
|
|
||
| @Schema(description = "지표의 파라미터 맵 (예: {\"length\": 20})") | ||
| @Schema(description = """ | ||
| 지표별 필수 파라미터 (Map 형식): | ||
| - SMA, EMA, RSI, CCI, ATR, ADX: { "length": 14 } | ||
| - MACD: { "fast": 12, "slow": 26, "signal": 9 } | ||
| - BB (볼린저밴드): { "length": 20, "k": 2.0 } | ||
| - STOCH (스토캐스틱): { "kLength": 14, "dLength": 3 } | ||
| """, example = "{\"length\": 20, \"k\": 2.0}") | ||
| private Map<String, Object> params; | ||
|
|
||
| //private String transform; // 거래량 관련 필드, 추후 적용 고려 | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.