#Quantopian Algorithm ordertarget_percent
4063 단어 QuantopianPython
order_target_percent
order_target_percent는 order_percent와 마찬가지로 현재 투자조합 가치의 ~%를 주문하는 함수로 현재 위치에 대한 평가액과 현금의 합계, ~%를 주문하지만 다른'order target~'함수와 마찬가지로 이미 위치가 있으면 구매를 늘리지 않는다.
알고리즘 예
def initialize(context):
context.security = sid(35902)
schedule_function(rebalance,
date_rule=date_rules.every_day(),
time_rule=time_rules.market_close(minutes = 1))
def rebalance(context, data):
if data.can_trade(context.security):
order_target_percent(context.security, 1)
메모지
Phillip Morris로 시뮬레이션했습니다.
거래 개시일에는 PM을 100% 자기자본으로 매입하고 보유는 팔지 않는다.
이 시뮬레이션은 초기 투자 1000달러, 2017/1~2017/12/31 사이에 진행됩니다.
1월 4일에 10주, 10월 13일에 1주를 샀다.
1월 4일은 첫 거래일이고,
10월 13일 주식 1주 증가는 과연 무엇일까?
그것은 이익 분배다.
PM이 10월 12일 개최한 페이먼트에 따르면 자신에 대한 자금은 단 1개로, 살 시간이 충분해 13일 클로즈업에서 구매를 늘렸다PM의 분배 이력
이런 일도 자동으로 할 수 있는Simulation은 매우 편리하다.
기타 주문 방법
#Quantopian Algorithm order
#Quantopian Algorithm ordervalue
#Quantopian Algorithm orderpercent
#Quantopian Algorithm ordertarget
#Quantopian Algorithm ordertarget_value
Reference
이 문제에 관하여(#Quantopian Algorithm ordertarget_percent), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/shinseitaro/items/426ec2605275a34edc86텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)