동적 포지션 관리 일일 트레이딩 전략


생성 날짜: 2024-05-28 11:21:52 마지막으로 수정됨: 2024-05-28 11:21:52
복사: 0 클릭수: 674
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

동적 포지션 관리 일일 트레이딩 전략

개요

이 전략은 일일 일관된 거래 방식을 채택하고 있으며, 위험을 엄격하게 통제하면서 소규모 목표 수익을 포착하는 데 중점을두고 있습니다. 이 전략은 2021년부터 재검토되었으며, 거래 성공률이 100%에 달하는 안정적인 성과를 보여주고 있습니다.

전략 원칙

이 전략의 핵심 원칙은 이전 거래일의 시장 움직임을 기반으로, 매 거래일 개시시 새로운 다단위 또는 공백위 포지션을 개설한다. 구체적으로, 전날 포지션이 없다면, 전략은 새로운 하루 개시시 다단위 포지션을 개설한다. 이미 다단위 포지션이 있다면, 전략은 목표 수익률 0.3%에 도달했는지 확인하고, 도달하면 포지션을 청산한다. 공백위 포지션에 대해, 전략은 0.2%의 중지 손실에 도달했는지 확인하고, 도달하면 공백위 포지션을 청산하고, 동시에 새로운 다단위 포지션을 개설한다. 이것은 전략이 시장에서 항상 틈을 유지하는 것을 보장한다.

전략적 이점

매일매일 거래하는 이 전략에는 몇 가지 중요한 장점이 있습니다.

  1. 100% 성공률: 36개의 매진된 거래에서 이 전략은 100%의 성공률을 달성했다.
  2. 역동적인 포지션 관리: 공백 포지션이 상쇄 손실을 만지면, 전략은 즉시 새로운 다중 포지션을 개설하여 그것을 대체하여 지속적인 시장 여점을 보장합니다.
  3. 엄격한 위험 관리: 이 전략은 0.3%의 목표 수익률과 0.2%의 중지 손실을 설정하여 위험을 효과적으로 통제합니다.
  4. 규칙적인 시장 참여: 전략은 매일의 시작에 포지션을 열고, 규칙적인 시장 참여를 보장한다.
  5. 튼튼한 재검토 결과: 2021년부터 시작된 재검토는 튼튼한 성과를 보였으며, 당기순이익은 22.2%로, 최대 인출은 13.75%였다.

전략적 위험

이 전략은 뛰어난 성과와 위험 관리를 보여줬지만, 몇 가지 잠재적인 위험은 여전히 존재합니다:

  1. 지속적인 손실의 가능성: 재검토 결과는 인상적이지만, 과거의 성과는 미래의 결과를 보장하지 않습니다. 연속적인 손실 거래는 수익을 훼손 할 수 있습니다.
  2. 블랙 스윙 사건: 전략은 예상보다 더 큰 손실을 초래할 수 있는 우연한 사건과 극단적인 시장 변동에 영향을 받을 수 있다.
  3. 리베이트 위험: 이 전략은 거래당 200%의 리베이트를 사용했는데, 이는 잠재적인 수익을 확대하면서도 위험을 증가시킨다.

이러한 위험을 완화하기 위해, 다양한 시장과 자산 클래스에 유사한 전략을 적용하여 다양성을 증가시키는 것이 고려 될 수 있습니다. 또한 변화하는 시장 상황에 적응하기 위해 전략 매개 변수를 정기적으로 모니터링하고 조정하는 것이 중요합니다.

전략 최적화 방향

  1. 매개 변수 최적화: 목표 수익, 중지 손실 및 기타 핵심 매개 변수는 추가적인 피드백과 최적화를 통해 개선 될 수 있으며, 이는 다양한 시장 조건에서 최적의 성능을 달성합니다.
  2. 다각화: 전략이 다른 시장과 자산 카테고리로 확장되면 전반적인 수익을 높이고 위험을 줄일 수 있습니다.
  3. 역동적인 포지션 조정: 시장의 변동성이나 다른 요인에 따라 역동적으로 포지션 크기를 조정하여 리스크 조정 후 수익을 더 최적화 할 수 있습니다.
  4. 추가 필터 추가: 추가 기술 지표 또는 시장 감정 지표를 필터로 도입하면 거래 신호의 질을 향상시킬 수 있습니다.

요약하다

전반적으로 이 일일 거래 전략은 위험 관리와 지속적인 수익을 중심으로 일일 거래를 하는 균형 잡힌 방법을 제공합니다. 체계화되고 엄격한 거래 방법을 찾는 거래자에게 적합합니다. 전략은 100%의 승률과 건전한 위험 조정 후의 수익으로 인상적인 회귀 결과를 보여줍니다. 그러나 과거 성능이 미래의 결과를 보장하지 않는다는 것을 인식하는 것이 중요합니다. 위험을 관리하고 시장 변화에 적응하는 것이 중요합니다.

전략 소스 코드
/*backtest
start: 2023-05-22 00:00:00
end: 2024-05-27 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Daily AUD-JPY Trading", overlay=true, initial_capital=1000, currency="AUD", default_qty_type=strategy.percent_of_equity, default_qty_value=200, commission_type=strategy.commission.percent, commission_value=0.1)

// Input parameters
profit_target = input(0.3, title="Profit Target (%)") / 100
loss_target = input(0.2, title="Loss Target (%)") / 100
start_year = input(2021, title="Start Year")

// Calculate daily open and close
new_day = ta.change(time("D"))

var float entry_price_long = na
var float entry_price_short = na
var bool position_long_open = false
var bool position_short_open = false

// Date check
trade_start = timestamp(start_year, 1, 1, 0, 0)

if new_day and time >= trade_start
    // If there was a previous long position, check for profit target
    if position_long_open
        current_profit_long = (close - entry_price_long) / entry_price_long
        if current_profit_long >= profit_target
            strategy.close("AUD Trade Long", comment="Take Profit Long")
            position_long_open := false
    
    // If there was a previous short position, check for profit target
    if position_short_open
        current_profit_short = (entry_price_short - close) / entry_price_short
        if current_profit_short >= profit_target
            strategy.close("AUD Trade Short", comment="Take Profit Short")
            position_short_open := false

    // Check for daily loss condition for short positions
    if position_short_open
        current_loss_short = (close - entry_price_short) / entry_price_short
        if current_loss_short <= -loss_target
            strategy.close("AUD Trade Short", comment="Stop Loss Short")
            position_short_open := false
            
            // Open a new long position to replace the stopped short position
            strategy.entry("AUD Trade Long Replacement", strategy.long)
            entry_price_long := close
            position_long_open := true

    // Open a new long position at the start of the new day if no long position is open
    if not position_long_open and not position_short_open
        strategy.entry("AUD Trade Long", strategy.long)
        entry_price_long := close
        position_long_open := true

    // Open a new short position at the start of the new day if no short position is open
    if not position_short_open and not position_long_open
        strategy.entry("AUD Trade Short", strategy.short)
        entry_price_short := close
        position_short_open := true

// Check for continuous profit condition for long positions
if position_long_open
    current_profit_long = (close - entry_price_long) / entry_price_long
    if current_profit_long >= profit_target
        strategy.close("AUD Trade Long", comment="Take Profit Long")
        position_long_open := false

// Check for continuous profit condition for short positions
if position_short_open
    current_profit_short = (entry_price_short - close) / entry_price_short
    if current_profit_short >= profit_target
        strategy.close("AUD Trade Short", comment="Take Profit Short")
        position_short_open := false

// Plot the entry prices on the chart
plot(position_long_open ? entry_price_long : na, title="Entry Price Long", color=color.green, linewidth=2)
plot(position_short_open ? entry_price_short : na, title="Entry Price Short", color=color.red, linewidth=2)

// Display current profit/loss percentage for long positions
var label profit_label_long = na
if position_long_open and not na(entry_price_long)
    current_profit_long = (close - entry_price_long) / entry_price_long * 100
    label.delete(profit_label_long)
    profit_label_long := label.new(x=time, y=high, text="Long P/L: " + str.tostring(current_profit_long, format.percent), style=label.style_label_down, color=color.white, textcolor=color.black,xloc=xloc.bar_time)

// Display current profit/loss percentage for short positions
var label profit_label_short = na
if position_short_open and not na(entry_price_short)
    current_profit_short = (entry_price_short - close) / entry_price_short * 100
    label.delete(profit_label_short)
    profit_label_short := label.new(x=time, y=high, text="Short P/L: " + str.tostring(current_profit_short, format.percent), style=label.style_label_down, color=color.white, textcolor=color.black,xloc=xloc.bar_time)