주간 옵션 거래 전략

저자:차오장, 날짜: 2024-02-04 15:14:43
태그:

img

전반적인 설명

이 전략은 스토카스틱 주간 옵션 거래 전략이라는 이름으로 스토카스틱 오시레이터를 사용하여 장기 및 단편 양쪽에서 옵션 거래의 잠재적 진입 및 출구 지점을 식별합니다. 두 방향으로 거래 기회를 포착 할 수있는 옵션 거래에 맞춤되었습니다.

전략 논리

이 전략은 스토카스틱 %D로 14개 기간의 스토카스틱 %K 라인과 3개 기간의 간단한 이동 평균 라인을 그래프화한다. %D보다 %K의 상향 크로스는 상승 신호로 간주된다. %D 이하의 %K의 하향 크로스는 하향 움직임을 나타낸다. 구체적인 입출 규칙은 아래와 같이 정의된다:

롱 엔트리: %K가 20보다 낮을 때 %D를 넘습니다. 긴 출구: %K가 80보다 높을 때 %D보다 낮습니다. 짧은 입력: %K가 80보다 높을 때 %D보다 낮습니다. 짧은 출구: %K가 20보다 낮을 때 %D를 넘습니다.

장점

  1. 상위권과 하위권 구매를 피하기 위해 스토카스틱을 사용하여 과소매와 과소매 구역을 식별합니다.
  2. 신호를 필터링하고 매개 변수 최적화를 통해 품질을 향상
  3. 입상 및 출구 규칙을 조정하여 포지션 관리를 개선합니다.
  4. 위험 통제와 함께 옵션 거래에 대한 효율적인 레버리지

위험 분석

  1. 스토카스틱은 잘못된 신호를 생성하는 경향이 있습니다 - 다른 지표에서 필터를 필요로합니다.
  2. 고정 매개 변수 설정은 일부 거래 기회를 놓칠 수 있습니다.
  3. 변동성 시장으로 인한 마감 위험
  4. 기본 요소와 거시적 환경에 주목하십시오.

최적화 방향

  1. 거짓 신호를 스크린하는 이동 평균과 같은 필터를 추가합니다
  2. 최적을 찾기 위해 다른 매개 변수 조합을 테스트
  3. 거짓 신호를 피하기 위해 침투 구역의 폭을 늘려
  4. 더 나은 리스크 통제를 위해 스톱 로스를 최적화하고 수익을 취하십시오.

결론

이 전략은 스토카스틱을 사용하여 과반 구매 / 과반 판매 수준을 식별함으로써 잠재적 인 전환점을 포착합니다. 트렌드 추종 전술에 비해 전환점에 더 큰 움직임을 포착하는 것을 목표로합니다. 매개 변수 조정, 신호 필터링을 통해 추가 개선은 전략 안정성을 향상시킬 수 있습니다. 균형 잡힌 위험 관리로 옵션 중심 접근법은 잠재적인 더 높은 보상을 위해 효율적인 자본 배치를 허용합니다.


/*backtest
start: 2024-01-04 00:00:00
end: 2024-02-03 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Stochastic Weekly Options Strategy", overlay=true, shorttitle="WOS")

// Stochastic settings
K = ta.stoch(close, high, low, 14)
D = ta.sma(K, 3)

// Entry and exit conditions
longEntry = ta.crossover(K, 20)
longExit = ta.crossunder(K, 80)

shortEntry = ta.crossunder(K, 80)
shortExit = ta.crossover(K, 20)

// Strategy execution
strategy.entry("Long", strategy.long, when=longEntry)
strategy.close("Long", when=longExit)

strategy.entry("Short", strategy.short, when=shortEntry)
strategy.close("Short", when=shortExit)

// Alert conditions
alertcondition(longEntry, title="Long Entry Alert", message="Stochastic bullish crossover! Consider buying a call option.")
alertcondition(longExit, title="Long Exit Alert", message="Stochastic bearish crossover! Consider selling the call option.")
alertcondition(shortEntry, title="Short Entry Alert", message="Stochastic bearish crossover! Consider buying a put option.")
alertcondition(shortExit, title="Short Exit Alert", message="Stochastic bullish crossover! Consider selling the put option.")

// Plotting shapes for buy and sell signals
plotshape(longEntry, title="Calls Entry Label", color=color.new(color.green, 25),
     textcolor=color.white, style=shape.triangleup, text="Calls", location=location.belowbar, size=size.small)
     
plotshape(longExit, title="Calls Exit Label", color=color.new(color.green, 25),
     textcolor=color.white, style=shape.circle, text="Exit", location=location.belowbar, size=size.small)

plotshape(shortEntry, title="Puts Entry Label", color=color.new(color.red, 25),
     textcolor=color.white, style=shape.triangledown, text="Puts", location=location.abovebar, size=size.small)

plotshape(shortExit, title="Puts Exit Label", color=color.new(color.red, 25),
     textcolor=color.white, style=shape.circle, text="Exit", location=location.abovebar, size=size.small)

// Plotting
plot(K, color=color.blue, title="Stochastic %K")
plot(D, color=color.red, title="Stochastic %D")
hline(80, "Overbought", color=color.red)
hline(20, "Oversold", color=color.green)


더 많은