Class SpotBacktestingAccount
java.lang.Object
io.runon.trading.backtesting.account.SpotBacktestingAccount
- All Implemented Interfaces:
io.runon.trading.account.Account
현뮬 백테스팅 계좌
- Author:
- macle
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigDecimalprotected BigDecimalprotected final Map<String,SpotBacktestingHolding> protected final Objectprotected BigDecimalprotected SymbolPrice -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCash(BigDecimal cash) 계좌 자산getBuyFee(SpotBacktestingHolding holding, BigDecimal price, BigDecimal volume) 매수 수수료 구현된 내용은 종목별로 수수료가 다른경우는 구현되어 있지않음 종목별로 수수료가 다른경우 Override 해서 구현getCash()getId()getSellFee(SpotBacktestingHolding holding, BigDecimal price, BigDecimal volume) 매도 수수료 구현된 내용은 종목별로 수수료가 다른경우는 구현되어 있지않음 종목별로 수수료가 다른경우 Override 해서 구현voidsetBuyFee(BigDecimal buyFee) 구매 수수료 설정voidsetCash(BigDecimal cash) voidsetFee(BigDecimal fee) 수수료 설정 구매수수료와 판매수수료가 같은경우 다른경우는 각각 설정voidsetSellFee(BigDecimal sellFee) 판매수수료 설정voidsetSymbolPrice(SymbolPrice symbolPrice) void
-
Field Details
-
cash
-
buyFee
-
sellFee
-
holdingMap
-
lock
-
symbolPrice
-
-
Constructor Details
-
SpotBacktestingAccount
-
-
Method Details
-
setFee
수수료 설정 구매수수료와 판매수수료가 같은경우 다른경우는 각각 설정- Parameters:
fee- 수수료
-
setBuyFee
구매 수수료 설정- Parameters:
buyFee- 구매수수료
-
setSellFee
판매수수료 설정- Parameters:
sellFee- 판매수수료
-
setCash
-
addCash
-
trade
-
getBuyFee
매수 수수료 구현된 내용은 종목별로 수수료가 다른경우는 구현되어 있지않음 종목별로 수수료가 다른경우 Override 해서 구현- Parameters:
holding- 종목별 수수료가 다른경우 아래 메소드를 오버라이딩 해서 구현 (종목 정보를 얻기위한 용도)price- 가격volume- 거래량- Returns:
- 수수료
-
getSellFee
매도 수수료 구현된 내용은 종목별로 수수료가 다른경우는 구현되어 있지않음 종목별로 수수료가 다른경우 Override 해서 구현- Parameters:
holding- 종목별 수수료가 다른경우 아래 메소드를 오버라이딩 해서 구현 (종목 정보를 얻기위한 용도)price- 가격volume- 거래량- Returns:
- 수수료
-
setSymbolPrice
-
getAssets
계좌 자산- Specified by:
getAssetsin interfaceio.runon.trading.account.Account- Returns:
- cash + holdings
-
getId
- Specified by:
getIdin interfaceio.runon.trading.account.Account
-
getCash
- Specified by:
getCashin interfaceio.runon.trading.account.Account
-