냥냥펀치데스
BAO_BAO
냥냥펀치데스
  • 분류 전체보기
    • AI 공부
      • AI 끄적
      • ML 끄적
      • DL 끄적
      • 데이터 끄적
      • RL 끄적
      • GAN 끄적
    • 끄적이기
      • etc
      • 독서
    • 컴퓨터 공부
      • 운영체제
      • ADsP 공부
      • 파이썬 공부
      • etc
    • 코딩공부
      • 문제 풀이
    • 금융공학
      • BackTrader 공부
      • etc
      • 논문구현
      • 퀀트 투자 공부
      • 전략 연습
    • 블록체인
      • ICO 분석
      • etc

인기 글

최근 글

전체 방문자
오늘
어제

티스토리

hELLO · Designed By 정상우.
냥냥펀치데스

BAO_BAO

BackTrader 7 : Broker
금융공학/BackTrader 공부

BackTrader 7 : Broker

2022. 1. 2. 16:58
728x90

Broker Simulator

더보기

Supported order types -  the params are not controlled by the user

  • Market : open price 에 거래 설정
  • Close : close price 에 거래 설정
  • Limit : given limit price 에 거래 설정
  • Stop :  given stop price 에 거래 설정
  • StopLimit :  given stop price 에 limit 거래 설정

Params

더보기
  • cash (default: 10000) - starting cash
  • commission (default: CommInfoBase(percabs=True)) -  base commission scheme
  • checksubmit (default: True) - check margin/cash before order
  • eosbar (default: False)
  • filler (default: None) - A callable with signature: callable(order, price, ago)
    • order : the order in execution
    • price : the price at which the order is going to be executed
    • ago : index for ohlcv
  • slip_perc (default: 0.0) - slip prices Percentage in absolute termns
    • 0.01 is 1%
    • 0.001 is 0.1%
  • slip_fixed (default: 0.0) -  slip prices Percentage in units 
  • slip_open (default: False) -  slip prices for order execution used the opening price of the next bar
  • slip_match (default: True)  
    • True - broker will offer a match by capping slippage at high/low prices
    • False - broker will not match the order with the current prices
  • slip_limit (default: True) - given the exact match price requested & if slip_match is False.
    • True - Limit orders will be matched by capping prices to the limit / high/low
    • False - False and slippage exceeds the cap, then there will be no match
  • slip_out (default: False) - Provide slippage even if the price falls outside the high - low range.
  • coc (default: False) - Cheat-On-Close Setting this to True with set_coc enables
  • int2pnl (default: True) - 현금에 대한 이자 부여
  • shortcash (default: True)
    • True - 공매도할때 현금증가
    • False - 현금에서 운용비용 빼기
  • fundstartval (default: 100.0) - 순자산 가치 자산 측정 조절 -> 펀드의 가치 측정 가능
  • fundmode (default: False)
    • True - TimeReturn can automatically calculate returns based on the fund value

Function

더보기
  • set_cash(cash)
  • get_cash()
  • get_value(datas=None, mkt=False, lever=False)
  • set_eosbar(eosbar)
  • set_checksubmit(checksubmit)
  • set_filler(filler)
  • set_coc(coc)
  • set_int2pnl(int2pnl)
  • set_fundstartval(fundstartval)
  • set_slippage_perc(perc, slip_open=True, slip_limit=True, slip_match=True, slip_out=False)
  • set_slippage_fixed(fixed, slip_open=True, slip_limit=True, slip_match=True, slip_out=False)
  • get_orders_open(safe=False)
  • getcommissioninfo(data)
  • setcommission(commission=0.0, margin=None, mult=1.0, commtype=None, percabs=True, stocklike=False, interest=0.0, interest_long=False, leverage=1.0, automargin=False, name=None)
  • addcommissioninfo(comminfo, name=None)
  • getposition(data)
  • get_fundshares()
  • get_fundvalue()
  • add_cash(cash)
저작자표시 (새창열림)

'금융공학 > BackTrader 공부' 카테고리의 다른 글

BackTrader 6 : Orders  (0) 2021.12.30
BackTrader 5 : Indicators  (0) 2021.12.29
BackTrader 1 : Concepts  (0) 2021.12.24
BackTrader 4 : Strategy  (0) 2021.12.23
BackTrader 3 : DataFeed  (0) 2021.12.21
    '금융공학/BackTrader 공부' 카테고리의 다른 글
    • BackTrader 6 : Orders
    • BackTrader 5 : Indicators
    • BackTrader 1 : Concepts
    • BackTrader 4 : Strategy
    냥냥펀치데스
    냥냥펀치데스
    데이터 를 공부하는 무지몽매한 자입니다

    티스토리툴바