무역 전략 개발 프로세스


모델 개발.


개발.


eminiWorld 팀의 양적 연구의 핵심 목표는 변화하는 시장 환경에서 견고한 투자 모델을 개발하는 것입니다. 우리 연구 전문가 팀은 거래 아이디어를 공식화, 평가 및 구현하는 일을 담당합니다.


eminiWorld 연구원은 양적 및 체계적인 방법론의 틀 내에서 절대 수익을 창출 할 수있는 잠재력을 가진 거래 전략을 파악하고 평가해야 할 책임이 있습니다.


1. 세계 시장이 거래 시스템 포트폴리오에 포함되도록 승인합니다.


2. 유동성, 집행 비용, 거래의 깊이 및 교환 구조를 감시한다.


3. 각 프로젝트가 수행 될 프레임 워크를 수립한다.


성공 / 실패를 결정하기위한 지표와 함께 프로젝트의 목표 스트레스 유형 및 매개 변수 민감도의 유형을 포함하여 테스트의 견고성 - 프로젝트에 사용할 수있는 데이터의 품질을 테스트하여 정확한 구현을 보장하기 위해 필요한 인프라 구조 구현 후 일상 모니터링.


4. 새로운 전략의 타당성을 테스트하기 위해 독점적 인 계좌 자금 조달에 동의합니다.


우리의 접근 방식은 정량적이고 체계적입니다. 모든 프로젝트는 공식적인 컴퓨터 모델링에 적응해야합니다. 이러한 공식 모델은 각 시장에서의 방향성 포지션, 각 포지션에서의 위험 노출 및 전체 포트폴리오 내에서의 위험 배분을 포함한 거래의 모든 측면을 통제합니다.


트레이딩 전략은 정량적으로 표현되어야하며 전략이 포착하도록 고안된 특성의 정확한 특성에 대해 신중히 고려해야합니다. 어떤 거래 전략도 어떤 단일 열쇠에 의존하지 않습니다. 사람; 잘 조사 된 전략에 대한 철저한 준수는이 과정에 내재되어 있으며 객관성을 보장합니다. & # 8220; 성공 & # 8221; 구체적으로 거래 전략의


대용량 데이터를 실시간으로 캡처, 저장 및 분석합니다. 정확성을 보장하기 위해 연구 지원 인력이 분석하고 검토 할 여러 소스의 중복 데이터 피드. 기술 인프라는 기본 시스템의 장애 발생시 인계 할 수있는 실시간 원격 컴퓨터 시스템을 유지함으로써 내결함성이 있어야합니다.


기관, 헤지 펀드, CTA, 독점 거래 그룹 및 전문 상인 모두 서로 다른 필요를 가지고 있습니다.


자산 클래스 별 실적.


- Barra의 Arthur Ashe 광고.


자산 클래스 별 실적.


흥미 롭 군.


유용한 링크.


저작권 및 사본; 2011 eminiWorld. 판권 소유.


알고리즘 트레이딩 전략 개발을위한 7 가지 핵심 요소.


브라이언 플레처.


1. 위험 관리.


거래 전략을 수립 할 때 항상 위험에 처한 금액을 생각하게하십시오.


모든 직책을 중단해야하는 경우 잃게 될 금액을 계산하여 항상 전체 위험을 측정하고 추적하십시오.


직책과 전체 포트폴리오를 기준으로 위험을 측정하고 조정하여이를 수행 할 수 있습니다.


즉, 모든 거래가 중단 된 경우 총 계정 자본의 일정 비율로 잃을 금액을 알 수 있습니다.


간단한 예제 전략을 통해이 작업을 수행하는 한 가지 방법을 살펴 보겠습니다.


각 신규 거래에서 귀하의 총 자기 자본의 0.5 %를 위험에 처하게됩니다. 예제 전략에서는 Y 기간의 마지막 X 기간 중 가장 낮은 가격을 기준으로 후행 중지를 사용합니다.


느리게 움직이는 시장과 옆으로 나가는 시장에서 멈춤은 가격에 더 가깝게 움직이며 시간이 갈수록 위험은 감소합니다. 당신의 호의에서 포물선 움직임에서, 가격과 공개 위험은 당신의 후행 정지보다 훨씬 빨리 움직일 것입니다.


거래에 대한 공개 위험은 .5 %에서 그보다 많은 배수로 이동할 수 있습니다. 이 무역에서 위험을 더 줄이기위한 메커니즘이 없다면 무역이 모든 이익을 재빨리 되돌려 놓으면 자신의 형평과 정신에서 상당한 약화를 경험할 수 있습니다. 특히 당신이 동일한 움직임에서 모두 이익을 얻는 다수의 거래를 할 때.


algo traders의 경우, 이 발견은 각 직책에 대한 공개 위험과 전체 포트폴리오 위험을 설명하는 알고리즘이 필요하다는 것을 의미합니다.


우리가 어떻게이 일을 할 수 있니?


이러한 상황을 위해 특별히 설계된 알고리즘을 추가하면 위험 요소가 특정 임계 값을 초과 할 때 위치를 중지하거나 감소시킬 수 있으며 그런 다음 백 테스트에서 이러한 매개 변수를 최적화 할 수 있습니다.


거래 당 위험 = 총 지분의 X %.


이것은 각 거래에서 처음에 얼마나 위험했는지를 제어합니다.


최대 개별 무역 위험 = X % (이동 중지 또는 위치 축소)


이 수는 위의 수와 같거나 커야합니다.


최대 포트폴리오 위험 = Y % (이동 중지 또는 위치 축소)


전략이 많은 계측기를 거래하는 경우이 매개 변수는 총 포트폴리오 위험을 계속 확인할 수 있습니다. 백 테스트를 통해 예제 전략의 총 포트폴리오 위험을 보여주는 시각적 예가 있습니다.


Trading Blox 소프트웨어를 사용하여 작성된 이미지.


나는 이것이 2008 년에 긴 석유 였을 때 어려운 길을 배웠습니다. 나는 오랜 기간의 후행 지표를 출구로 사용했습니다. 광범위한 범위의 백 테스터에서 공개 이익에 대한 리스크 통제가 전형적이지 않은 것처럼 포물선 움직임으로 간주되지 않았습니다.


저의 전략은 느리고 불안정한 시장에서 대부분 안정적이었습니다.


내가 140 달러 이상으로가는 길에 2008 년에 긴 기름이었을 때, 그것은 상쾌했다. 그러나 동시에, 더 빨리 올라 갔을 때, 내 멈춤이 얼마나 멀리 떨어져 있는지 보았을 때 더욱 걱정했습니다. 따라 잡기 위해 내 정류장을 공고히하기를 원한다는 것을 기억합니다.


나는 이익을 얻었지만 선물 시장의 큰 계약 규모로 인해 나는 나의 위치를 ​​얼마나 줄일 수 있었는지 매우 제한적이었다. 그 자리에 나가게 된 후, 리스크가 개별 직책에 대해 일정 수준을 초과 할 때 내 스톱을 조정하여 리스크를 측정하고 통제하는 시스템 변경을 구현했습니다.


Marketscope / Trading Station II에서 생성되었습니다.


과거 성과는 미래의 결과를 나타낼 수 없습니다.


2. 시장 선택, 기간 및 포트폴리오 구성.


트레이딩중인 시간대 (m1, h1 등)는 거래 시스템, 백 테스팅 플랫폼, 필요한 클라우드 기반 리소스, API 사용 및 콜 로케이션 서비스가 필요할 경우 고려할 잠재적 인 시장에 영향을 미칩니다.


틱 또는 1m 바에서 트리거 또는 실행을 기반으로하는 고주파 시스템은 백 테스팅 및 최상의 결과를위한 최적화를 위해 컴퓨팅 성능의 버스트 스케일링을 허용하는 클라우드 기반 솔루션이 필요할 수 있습니다. 일부 타사 알고리즘 거래 플랫폼은 패키지의 일부로이를 포함합니다.


컴퓨팅 파워와이를 활용하는 데 최적화 된 백 테스팅 엔진은 모든 거래 시스템의 전략 개발 프로세스에 많은 시간을 할애 할 것입니다.


높은 빈도 전략을 고려하는 사람들은 가능한 한 중개인의 서버에 가깝게 배치되고 FIX API를 통해 통합 된 프로덕션 시스템을 고려하여 모든 가격 업데이트를받습니다. 모든 시세는 거래가 아닌 모든 푸시로 푸시됩니다. Station 또는 ForexConnect API.


원하는 가격으로 채우기를 얻거나 수익성 측면에서 더 중요 할 때 아키텍처, 코드 및 서버 위치를 가능한 한 짧게 유지하면 필요한 정확한 시간에 많은 유동성을 얻을 수있는 최상의 기회를 얻을 수 있습니다 그것.


FXCM의 VPS 파트너는 필요에 따라 코 로케이션 서비스를 제공합니다.


일부 중개인은 대량 거래자에게 할인 수수료를 제공합니다. 귀하의 전략이 매월 5,000 만 달러 이상의 거래량을 창출했거나 150,000 달러의 위험 자본으로 시작한다면 FXCM의 활성 거래자 계정을 사용하여 수수료를 25-55 %에서 할인받을 수 있습니다.


각 시장의 기본 유동성 특성을 이해하면 전략이 얼마나 확장 성이 있는지 알 수 있습니다. 당신이 원하는 가격의 유동성은 무제한의 자원이 아니며 시장, 시간 및 상황에 따라 상당히 다를 수 있습니다.


성공적인 Traders Guide의 Traits of Successful Traders에는 이와 관련된 훌륭한 데이터가 있습니다.


낮은 주파수 시스템은 일반적으로 미끄러짐 추정과 관련하여 오류에 대해 더 큰 마진을 제공합니다. 백 테스트에서 전체 거래의 수가 적을수록 스키드 실행에 대한 회계 처리가 훨씬 높은 빈도 전략보다 전반적인 수익성에 영향을 미친다는 것을 의미합니다.


귀하의 전략이 가격 채널 또는 일부 유형의 지연 지시기를 기반으로 휴계 정지 명령을 사용하여 주문을 실행하는 경우 지연 시간을 줄이면 특정 전략 특정 상황을 제외하고는 큰 영향을 미치지 않을 것입니다.


브로커 서버에 앉아있는 모든 정류장이나 한계에 도달 할 때 속도를 향상시키지 않아도됩니다.


개별 시장은 성과면에서 매우 다양합니다. 다른 것들은 눈물을 흘리는 반면, 어떤 것들은 장기간에 걸치는 범위 일 수 있습니다. 이 때문에 포트폴리오의 소규모 시장은보다 다양하고 다양한 시장 및 전략 포트폴리오보다 변동성이 큰 수익을 창출 할 수 있습니다.


그렇다면 훨씬 낮은 빈도 전략을 사용하여 USD / ZAR과 같은 포트폴리오에 다양 화 이익을 추가 할 수있는 시장이 있지만 전략에 따라 짧은 시간 프레임을 사용할 때 수익성이 떨어질 수 있습니다.


3. 고급 주문 유형을 활용하십시오.


많은 수의 거래자는 거래 내외부에 대한 시장 주문만을 활용합니다. 전형적인 시장 상황에서, 대부분은 그들이받는 채움에 만족할 것입니다. 그러나 불확실성이 많은 빠른 시장에서 유동성 공급자는 자신을 보호하기 위해 더 넓은 시세를 보내고 가격은 매우 빠르게 움직일 수 있습니다.


브레이크 아웃 및 운동량 기반 전략은 저항 수준이 제거되고 주문 흐름이 한 방향으로 무거울 때 거래가 시작될 경우 미끄러질 수 있습니다. 거래 주문을하기 위해서만 정지 명령을 사용하면 실행을 보장 할 수 있지만 미끄러짐 위험은 크게 열리게됩니다. 범위 입력 명령을 사용하여 허용 범위 내의 거래를 입력 할 수 있지만 미끄러짐이 허용되지 않는 주문은 거부합니다.


제한 전략이나 Fill이나 Kill 명령을 활용하면 전략에 따라 미끄러짐이 없거나 심지어는 미끄러질 수 있습니다. 이러한 예로는 고주파 평균 반향 또는 이벤트 기반 전략이 있습니다. 백 테스팅은 각 거래에서 100 % 실행을 가정 할 수 있지만, 현실은 빠른 시장에서 다를 수 있습니다.


결론 : 귀하가 이용할 수있는 주문 유형과 우수한 실행을 도울 수있는 방법을 이해하십시오.


주문 유형의 예.


예제 거래 명령.


4. 위치 크기 조정.


위치를 정하는 두 가지 일반적인 방법이 있습니다.


고정 로트 기반 포지션 사이징 : 쌍에 관계없이 동일한 로트 크기를 거래 위험 기반 포지션 사이징 : 위험은 스톱 손실 배치를 기반으로 각 거래에 대해 계산됩니다.


고정 로트 위치 사이징.


이 접근법은 많은 거래자들에게 인기가 있지만이 접근법의 한계는 변동성이 적은 시장에서 과도한 비중 확대와 저평가로 이어질 수 있습니다. 환율의 차이는 명목상의 무역 규모가 크게 달라질 수 있습니다.


위험 기반 위치 결정.


오늘 본 자동화 시스템 중 상당수는 각 위치별로 고정 정지 손실 금액이 pips 단위로 있습니다. 불안정한 시장에서는 너무 가깝고 조용한 시장에서는 너무 멀리 떨어져있을 수 있다고 생각하면서이 접근 방식의 팬이 아닙니다. 이 접근 방식을 통해 무역 당 위험도가지도 전체에 걸쳐 있습니다.


리스크 기반 포지션 사이징은 리스크가 엔트리 가격에서 초기 중지를 뺀 것과 같은 거래 당 리스크를 고려합니다.


정교한 접근 방식은 각 시장의 고유 한 및 최근 평균 가격 범위를 고려하여 중단 게재 순위를 결정합니다.


이를 수행하는 한 가지 방법은 마지막 X 기간의 평균 실제 범위를 계산하고 초기 정지를 해당 숫자의 배수를 항목에서 멀리 떨어 뜨리는 것입니다. 이 방법은 각 시장의 고유 한 변동성을 기반으로 거래하는 각 시장에서 리스크의 균형을 동적으로 조정합니다.


변동성 기반 위치 결정에 대한 계산은 다음과 같습니다.


((총 지분 * 거래 당 위험) / (X 기간 ATR in pips * ATR 오프셋 * 1K 로트 당 pip 가치)) = 1K 로트의 거래 규모.


총 주식 = $ 100K.


무역 당 위험 = 1 %


X 기간 ATR in pips = 50.


1K 로트 당 입금 = $ 0.10.


133.333 = 1K 로트의 무역 규모 (133K EUR / USD 무역 제출을 위해 133으로 반올림)


변동이 심한 시장에서 시간대에 관계없이 평균 막대의 가격 범위는 불확실한시기에 상당히 급격하게 움직일 수 있으며 매우 빠르게 움직이는 시장과 많은 방향성 소음을 초래하여 많은 거래자들이 흔들 리게됩니다.


그러나 각 시장에 대한 최근의 ATR (Average True Range)을 활용하고 그 배수를 사용하여 귀하의 중지 가격을 결정하면 단기적인 소음을 필터링하여 성공 가능성을 높일 수 있다고 생각합니다. 휘발성).


반대로, 내가 좋아하는 무역 체제는 항상 거래 범위가 좁은 조용한 시장에 있습니다. 최근 ATR을 활용하여 포지션의 규모를 결정하면 상대 가격 범위가 낮은 시장에서 더 엄격한 위치와 더 큰 포지션 규모로 이어질 것입니다.


또한이 방법을 사용하면 거래하는 각 시장에서 일관된 포지션 사이징 방식을 사용함으로써보다 균형 있고 다양해진 포트폴리오를 얻을 수 있다는 이점이 있습니다. 포지션 사이징에 대한 각 시장의 변동성을 고려하지 않으면 포지션 중 하나의 변동성이 다른 거래보다 몇 배 더 클 수 있습니다.


내 말을 받아들이지 말고, 그것을 다시 테스트하고 결과를 면밀히 연구하십시오. 하지만 백 테스팅에는 한계가 있으며 과거의 성과는 미래의 결과를 나타내는 것은 아닙니다.


가장 먼저 필요한 것은 데이터입니다. 나는 당신이 테스트 한 것을 거래하고 거래하는 것을 테스트하는 것이 중요하다고 생각합니다. 분산 된 FX 시장의 성격은 각 브로커의 역사적 가격 내역 및 스프레드가 다를 수 있음을 의미합니다.


FXCM은 ForexConnect API 또는 Historical Data Downloader 앱을 통해 무료로 모든 계측기에 대한 광범위한 내역 데이터를 제공합니다.


일부 타사 알고리즘 거래 플랫폼은 FXCM의 과거 데이터에 대한 액세스를 제공하지만 전체 데이터 세트를 보유하지는 않습니다. 이 중 하나를 사용하고 더 많은 데이터가 백 테스트되도록하려는 경우 해당 옵션을 사용하여 데이터 파일에 추가 할 수 있습니다.


거래 전략에 대해 좋은 아이디어를 얻은 다음 실시간 거래로 코딩하는 것이 가장 좋은 방법이지만 실제 거래에 뛰어 들거나 비현실적인 백 테스트를 활용하는 경우 첫 번째 거래를 처리하는 데 어려움을 겪을 가능성이 큽니다 삭감.


귀하의 백 테스팅이 사실적이지 않거나 각 거래에서 완벽한 실행을 가정하는 것과 같은 잘못된 가정을 사용할 경우 실제 결과가 귀하의 백 테스팅과 매우 다를 수 있습니다.


탁월하게 설계된 백 테스팅 엔진은 과거 실적이 미래 실적을 나타내는 것은 아니지만 실적이 좋고 수익을 올릴 수없는 것을 발견하는 데 도움을 줄 수 있습니다.


다양한 매개 변수 변형을 탐색하고 실적 통계를 검토하고 시각적 인 성과를보고 차트에서 거래 실적을 기준으로 거래를 볼 수 있어야합니다.


가장 정교한 백 테스트 플랫폼은 동시에 수많은 시장에서 결과를 검사하고 최적화 할 수있는 능력을 갖추고 있습니다. 제 생각에, 이것은 다양한 시장에 적합한 전략을 발견하고 위험이 전체 포지션 포트폴리오에 대해 관리되는 경우 매우 중요합니다.


귀하의 거래 전략을 최적화하지 않으면, 당신이 할 수있는만큼 좋은 수익을 거둘 수있는 전략을 가질 가능성이 있습니다. 반대로, 지나치게 최적화하면 과거 데이터에서만 잘 수행 할 수있는 전략으로 끝날 수 있습니다. 핵심은 이들 사이의 균형을 찾는 것입니다.


역 테스팅으로 전략을 최적화 할 때 직면하게 될 가장 큰 위험은 커브 피팅입니다. 다양한 변수로 최적화되었거나 하나의 시장에서만 최적화 된 시스템을 항상 염두에 두었습니다. 달리 말하자면, 시스템의 자유도를 제한하고 싶습니다.


거래 시스템에 매개 변수가 많을수록 반복적 인 패턴이 아닌 단순한 노이즈 일 가능성이있는 놀라운 결과로 과거 가격 기록의 매개 변수를 완벽하게 최적화하는 것이 매우 쉽습니다.


한 시장에서만 전략을 다시 테스트해도 동일한 효과를 얻을 수 있습니다. 하나의 가격 흐름에 대해서만 결과를 시뮬레이션하기 때문에 백 테스팅 결과가 놀랍지 만 통계적으로 유의미하지 않은 과거 데이터에 매개 변수를 지나치게 쉽게 적용 할 수 있습니다.


많은 성공적인 시스템 거래자에 대한 저의 경험과 연구에서 많은 사람들은이 위험을 피하기 위해 매개 변수 수가 적은 매우 간단한 시스템을 사용합니다.


전략 논리를 단순하게 유지하면 거래 결정을 내릴 때 전반적인 대기 시간을 줄일 수 있습니다. 예를 들어 시스템이 10 개가 아닌 6 개의 체크 포인트 만 처리해야하는 경우 매우 적극적인 전략을 수행하는 경우 실행 통계가 향상됩니다.


7. 위험 허용 오차.


모든 사람은 연령, 소득, 지출, 위험 자본, 일반적인 위험 식욕 및 그들이 일반적으로 낙관적인지 비관적인지 여부 등 특별한 상황과 처분을 가지고 있습니다. 이 때문에 각 사람은 그들이 처리 할 수있는 위험의 종류를 결정해야합니다. 위험 자본이 거의 없으면 최선의 방법은 전혀 거래하지 않고 계속해서 돈을 절약하는 것입니다.


대부분의 알 고리 거래자는 낙관적 인 사람이며 평균 조보다 나은 결과를 얻을 수 있다고 생각합니다. 이로 인해 손실이나 거래자가 추가 손실 가능성에 대한 심리적 삼촌 지점에 도달하여 매우 빨리 닦아 낼 수있는 위험이 많은 대담한 거래 계획이 생길 수 있습니다.


나는 당신이 큰 drawdown의 중간에 앉아있을 때 당신이 거래의 시작에서했던 것처럼 낙천적 인 것이 어렵다는 것을 확신 할 수 있습니다.


내가 배가 고프고 외식 할 때처럼. 나는 보통 내가 할 수있는 것보다 더 많은 음식을 주문한다. 그러나 나는 채워질 때까지 이것을 깨닫지 못하고, 1 ~ 2 개 더 타코가 내 접시에 앉아 있습니다.


내 경험에 비추어 볼 때 이것은 첫 번째 자동화 전략을 구현하는 것과 유사합니다. backtesting이 좋을 때 일년에 20 %를 만드는 전략이지만, 남자는 40 %가 훨씬 더 좋을 것이고, 해야 할 일은 더 큰 결점을 기꺼이 받아들이기만하면됩니다!


펀드를 출시하기 전에 NFA 규제 화폐 매니저 인 많은 체계적 상품 거래 자문가의 성과 결과를 연구 한 것을 기억합니다. 오랫동안 사용해온 CTA 중 상당수는 처음 몇 년 동안 실적이 좋았지 만 변동이 있었지만 훨씬 더 보수적이었습니다. 그림을 이동.


귀하의 진정한 위험 허용 성은 귀하가 생각하는 것보다 적을 수도 있습니다. 자본의 생존과 보존을 고려해야 할 가장 중요한 것이지, 당신의 백 테스팅을 토대로 해마다 얼마나 많은 돈을 벌 수 있는지 잊지 마십시오.


당신의 전략을 실행시킬 때, 감정의 모든 스펙트럼을 완전히 경험할 것을 기대하십시오. 그러나 두려움이나 희망으로 인해 과도한 위험을 감수하거나 전략을 능가하려고 시도하고 자신이 가진 감정을 거래함으로써 자신의 감정을 기반으로 충동적인 결정을 내리지 않는 것이 중요하다고 생각합니다.


두려움이나 욕심에 대한 강한 감정은 시스템 거래시에 좋지 않은 결정을 내릴 수 있습니다. 컴퓨터는이를 처리 할 필요가 없으므로 내 의견으로는이를 처리하기위한 가장 좋은 전략은 변화를 만들기 전에 강력한 거래 시스템을 찾고이를 고수하고 연구 프로세스를 활용하는 것입니다.


귀하의 감정은 거래 시스템의 약점과 잠재적 인 기회를 파악하는 데 도움이 될 수 있습니다. 거래 실적의 변동성이 항상 두려움을 벗어나는 경우 위험을 줄이십시오.


어쩌면 누락 된 것을 후회할 수도 있습니다. 후회에 귀 기울이고 백 테스트를 활용하여 미래에 그러한 기회 유형을 놓치지 않도록 시스템을 수정하는 방법을 모색하십시오.


석유 거래에서 많은 이익을 돌려 줬을 때 나는 꽤 혐오 스러웠다. 이로 인해 개인 트레이딩 리스크에 대한 전반적인 리스크 관리가 개선 된 트레이딩 시스템을 수정하게되었습니다.


함께 모아서.


다음은 방향 알고리즘 전략을 설계 할 때 고려해야 할 몇 가지 매개 변수입니다.


무역 당 진입 위험.


# ATR 룩백 기간의 수 # ATR multiple (이 시간에 ATR 룩백 기간의 배수를 곱하여 곱하기)


무역 필터 (해당되는 경우)


다음 조건이 충족되는 경우에만 신규 거래를 입력하십시오 (예 : 이중 이동 평균을 기준으로 한 경향).


좋아하는 기술 지표에 대한 매개 변수 삽입 거래 내외 거래에 대한 기타 논리 추가 (후행 중지, X ATR에서 이익 획득 등)


최대 개별 무역 위험.


최대 개별 무역 위험 = X % (상향 조정 또는 축소)


최대 포트폴리오 위험.


최대 포트폴리오 위험 = Y % (상향 조정 또는 교육 환경 고려)


백 테스트를위한 기타 중요 매개 변수 :


이것은 거래가 채워지는 막대의 채권 가격에서 최저 가격 / 최고 가격까지의 pips 또는 백분율로 계산할 수 있습니다.


algo 전략을 개발하고 실행하는 데 필수적인 요소는 무엇이라고 생각하십니까?


질문, 의견 및 피드백을 환영합니다. instructordailyfx에 전화를 끊어.


배포 목록에 가입하려면이 양식을 작성하십시오.


HYPOTHECTICAL PERFORMANCE 결과는 많은 내재적 인 제한이 있으며, 아래에 설명되어 있습니다. 어떠한 진술도 이익이나 손실을 달성 할 가능성이있는 것으로 나타났습니다. 사실상, 실적 실적과 특정 거래 프로그램에 의해 흔히 성취되는 실제 결과의 차이는 종종 상이합니다.


외상 성과 결과의 제한 중 하나는 일반적으로 통찰력의 혜택과 함께 준비된다는 것입니다. 추가적으로 HYPOTHETICAL TRADING은 재무 위험을 포함하지 않으며, HYPOTHITICAL TRADING RECORD는 실제 거래에서 재무 위험의 IM-PACT에 대한 완전한 계좌를 제공 할 수 없습니다. 예를 들어, 손실을 저 지르거나 거래 손실이있는 특정 거래 프로그램에 참석할 수있는 능력은 실제 거래 결과에 상당한 영향을 미칠 수있는 중요한 요소입니다. 일반적으로 또는 구현에있어 시장과 관련된 수많은 다른 요소가 있습니다. 정확한 실적 결과의 준비와 실제 거래 결과에 약간의 악영향을 미칠 수있는 모든 특정 거래 프로그램에 대해 완벽하게 설명 할 수 없습니다.


이 웹 사이트에 포함 된 모든 의견, 뉴스, 연구, 분석, 가격 또는 기타 정보는 일반 시장 논평으로 제공되며 투자 자문을 구성하지 않습니다. FXCM 그룹은 거래 신호에 포함 된 사용이나 의존으로 인해 또는 직접적으로 또는 간접적으로 발생할 수있는 이익 손실을 비롯한 모든 손실이나 손해에 대해 책임을지지 않습니다.


DailyFX는 글로벌 통화 시장에 영향을 미치는 추세에 대한 외환 뉴스 및 기술적 분석을 제공합니다.


다가오는 이벤트.


Forex 경제 달력.


과거 성과는 미래의 결과를 나타낼 수 없습니다.


DailyFX는 IG Group의 뉴스 및 교육 웹 사이트입니다.


꾸준히 수익성있는 무역 전략을 개발하기위한 단계별 프로세스.


귀하의 현재 거래 전략은 불어납니다; 새로운 것을 검색 할 때입니다. 그것은 많은 상인이 일관되게 유익한 결과를보고 있지 않을 때 생각하는 것입니다. 당신이 아마 깨닫지 못하는 것은 당신이 모든 도구를 가지고 있다는 것입니다; 그것은 단지 미세 조정의 문제입니다.


이 기사에서는 귀하의 성격에 맞는 맞춤 거래 전략을 만들고 세밀하게 조정하기위한 단계별 접근 방법을 알려 드리겠습니다. 계획을 수립했거나 현재 계획하고 있다면이 프로세스를 통해 미세 조정이 필요한 특정 영역을 파악할 수 있습니다. 시작하자!


성공적인 무역 계획의 조각.


포수의 장갑에 편안하게 맞는 야구처럼 거래 전략은 거래 계획에 맞아야합니다. 당신은 무역 계획과 무역 전략의 차이가 무엇인지 궁금해 할 것입니다. 거래 계획은 사업 계획이며 거래 전략은 거래 계획의 일부입니다. 나는 무역 계획을 두 부분으로 나누었다.


섹션 1 : 시장 이데올로기.


이 계획에는 귀하의 구체적인 목표, 아마도 귀하의 영감으로 작용하는 동기 부여 견적, 그리고 시장에 대한 귀하의 이데올로기가 포함되어야합니다. 계획의이 부분은 방향 및 지침을 제공하기 때문에 중요합니다. 이는 어려운시기 (특히 일부분이있을 수 있음)를 통해 특히 도움이됩니다.


섹션 2 : 거래 전략.


이것이 우리가 오늘 다루게 될 부분입니다. 섹션 1을 완료하지 않았다면 시작하기 게시물에서 트레이딩 목표 및 그 중요성을 개발할 수 있습니다.


이기는 무역 전략은 엄청나게 상세해야합니다. 가능한 모든 결과를 생각하고 성공을 위해 고려해야합니다. 흔히 상인이 무역을하게되면 계획과 객관성이 창 밖으로 나옵니다. 속담이 진행됨에 따라 행운은 준비를 좋아합니다. 첫 번째 실시간 거래를하기 전에 전략을 수립하는 데 시간을 투자하십시오.


승리하는 무역 전략의 개요.


거래 계획에는 여러 가지 전략이 포함될 수 있지만 먼저 전략을 완전히 개발하고 세밀하게 조정 한 후 한 단계 씩 진행하는 것이 좋습니다. 일단 수면의 설정을 시각화하고 주저없이 거래를 입력 할 수있는 첫 번째 전략이 생기면 추가 전략을 세울 준비가 된 것입니다.


거래 계좌를 개설 할 때 위험 한계를 설정하십시오.


최대 일일 손실 : 거래를 중단하기 전에 하루 동안 얼마를 잃고 싶습니까?


(Thumb of Rule : 귀하의 거래 자본금의 5 % 이하)


무역 당 최대 손실 : 각 무역에서 얼마만큼 위험합니까?


(Thumb of Rule : 전체 무역 자본의 1 %)


거래 할 시장과 시간을 지정하십시오 :


시장 선택 : 당신의 목표와 성격에 맞는 시장과 거래 수단은 무엇입니까?


항상 어딘가에 시장이 열려있는 반면, 최고의 거래자는 거래를하기 위해 정해진 소수의 특정한 시간에만 집중합니다. 일반 주식, 옵션, 선물 및 외환 외에도 다른 차량이 있습니다. 한 상인에게 효과가있는 것은 당신에게 효과가 없을 수 있으며 그 반대도 마찬가지입니다.


Pick a Time : 일정에 따라 거래 시간이 어떻게됩니까?


이미 바쁜 일정에 거래를 통합하는 것은 일, 가족 및 레크리에이션을 통합하는 것을 의미합니다. 처음 시작할 때 나는 데이 트레이딩에 뛰어 들기보다는 일일 차트의 더 큰 시간 틀을 고집하는 것이 좋습니다. 이것은 움직임이 발달하는데 오래 걸리기 때문입니다. 전략과 인내심을 동시에 구축 할 수 있습니다. 스피드가 더 많은 이익과 반드시 ​​일치하지 않는다는 것을 기억하십시오. 대부분의 경우 가장 큰 보상을 지불하는 것이 더 큰 시간 틀입니다.


귀하의 방법론은 승리를 거둔 거래 시스템의 작은 부분 일뿐입니다. 성공은 완벽한 실행으로 발생합니다. 다양한 지표를 통해 검색 할 때, 기술적 분석 연구와 기본적인 분석 기준은 K. I.S. S & # 8211; 그것을 간단하게 바보로 유지하십시오.


지표 선택 : 가격과 수량으로 시작하십시오.


거래 플랫폼을 열고 화면에서 모든 지표를 제거하십시오. 실제로, 당신이 거래하도록 선택한 시장의 촛대 나 막 대형 차트를 제외한 모든 것을 제거하십시오. 가격 행동을 관찰하고 2 주 동안 볼륨 패턴을 연구하십시오.


일일 차트를 인쇄하고 변곡점을 확인하십시오. 즉, 시장이 움직이기 시작하는 시점입니다. 돌아가서 반복적으로 일어나는 양과 비슷한 촛대 또는 막 대형의 추세를 찾으십시오. 비슷한 패턴이 여러 개 발견되면 거짓 이동을 필터링하고 최상의 항목을 찾아내는 데 도움이되는 표시기와 지표를 도입 할 수 있습니다.


피보나치 retracements, 시장 내부 및 촛대 차트는 내 자신의 방법론의 기초를 구성하는 세 가지 도구입니다.


거래 규칙 구조 개발.


다음은 내가 사용하는 일반적인 거래 규칙의 몇 가지 예입니다.


1. 귀하의 무역을 계획하고 계획을 교환하십시오.


2. 일을 간단하게하십시오.


3. 차분하고 시원하며 수집 된 상태에있을 때만 거래를하십시오. 이 마음 상태가 아니라면 거래하지 마십시오.


4. 귀하의 거래를 선택하십시오!


5. 거래를 쫓지 마십시오.


6. 최고를 사지 말고, 최저를 팔지 마라.


7. 큰 승자가 패자가되지 않도록하십시오.


8. 시장이 처음 예상대로 행동하지 않으면 빠져 나오십시오.


9. 잃어버린 위치에 절대 넣지 마십시오.


10. 인간 행동의 심리학을 이해하는 것은 경제학을 이해하는 것보다 더 중요합니다.


11. 혼자서는 모든 거래에 대해 책임을 져야합니다.


12. 태도는 행동에 영향을 미치므로 긍정적 인 태도를 유지하십시오.


13. 느슨하게 의견을 말하십시오.


14. 과거 거래를하지 마십시오.


15. 시장 상황에 따라 적응할 준비를하십시오.


귀하의 직책 규모를 설정하십시오.


옵션 및 선물과 같은 거래 계약 시장이 하나의 계약으로 시작됩니다. 그러나 일단 시장에 대한 느낌을 개발하면 2로 옮기는 것이 더 도움이됩니다. 이것은 이제 귀하의 수익을 극적으로 향상시킬 수있는 수평 확장 기능이 있기 때문입니다.


거래 주식의 경우 다음 방정식을 사용하여 구매할 주식 수를 결정하십시오.


재고 포지션 계산 : 거래 당 $ 위험 / $ 정지.


예를 들어 거래 당 위험 액이 $ 100로 설정되어 있고 거래에 $ 5 정지를 계획하면 20 주 ($ 100 / $ 5 = 20)를 구입할 수 있습니다.


모든 거래를하기 전에 고려해야 할 사항 :


이것을 내려 놓으면 당신의 전략에서 가장 중요한 부분이며, 거래를 시작하기 전에 진입, 정지 및 목표를 정의하면 거래가 전개되기 시작하면서 거래가 객관적이고 사고가 잘 유지 될 것입니다.


거래 전략을 세밀하게 조정하는 데 도움이되는 계산.


전략으로 거래를 시작하면 데이터 분석을 시작할 수 있습니다. 서류 거래 계정은 조정할 수있는 훌륭한 방법이지만 실제 거래 계정으로 전환하면 결과가 변경됩니다 (좋거나 나쁨).


데이터를 분석하기 전에 특정 설정으로 최소 100 가지 이상의 거래를 실시하는 것이 좋습니다.


다음 계산을 사용하여 데이터를 분석하십시오.


이기고지는 % : 당첨자 수 / 총 거래 수.


잃는 % = 100 & # 8211; 승리 %


평균 W / L $ 금액 : 수익성있는 거래의 합계 / 총 거래 수.


상실 거래의 합 / 상실 거래의 총수.


평균 승 / 패 대기 시간 : 승자와 패자 중 어느 곳에서 머물러 있습니까? 달콤한 자리를 찾으십시오.


보상 / 위험 비율 : Avg. W / Avg. 엘.


(당신의 승자가 패자를 얼마나 꺾고 있는지)


기대 : [(W % x 평균 W) - (L % x 평균 L)] - 라운드 턴 커미션.


(거래 당 승리 할 수있는 평균 금액 (또는 느슨한 금액).


이익 손실, 수수료, 일일 승자와 패자, 주간 수익 및 개별 거래 설정을 추적하십시오. 이렇게하면 거래 내 트렌드를 파악하고 더 세밀하게 조정할 수 있습니다. 개인 트레이딩 저널 작성을위한 제 아이디어에 대한 아이디어에서이 프로세스를보다 쉽게 ​​수행 할 수있는 몇 가지 방법을 설명합니다.


귀하의 거래 전략을 미세 조정하는 도구.


Trading Journal Spreadsheets - 최고의 거래 스프레드 시트. Stock Tickr - 깊이 분석을위한 훌륭한 웹 기반 도구. FinViz - 내가 제일 좋아하는 주식 스크리너. Jing - 스크린 샷을 쉽게 캡처 할 수 있습니다.


성공하려면 수익 / 손실이 아닌 효과적인 거래에 집중해야합니다. 연구하고 나서 행동하십시오. 이 단계별 접근법과 위의 도구를 사용하여 시간이 지남에 따라 지속적으로 수익을 창출하는 전략을 개발할 수 있도록 안내하십시오.


구독 / 연결.


뉴스 레터에 가입하고 뉴스, 분석 및 거래 아이디어로 업데이트를 수신하십시오.


주요 브로커.


© 2017 Traders Log.


거래는 손실 위험이 크며 모든 개인에게 적합하지 않습니다. 과거 성과는 미래의 결과를 나타내는 것은 아닙니다.


더 나은 전략을 수립하십시오! 3 부 : 개발 프로세스.


이것은 더 나은 전략 수립 시리즈의 세 번째 부분입니다. 이전 부분에서는 10 가지의 가장 악용 된 시장 비효율에 대해 논의하고 거래 전략의 몇 가지 예를 제시했습니다. 이 부분에서는 모델 기반 거래 시스템을 개발하는 일반적인 프로세스를 분석 할 것입니다. 거의 무엇이든, 당신은 (적어도) 두 가지 다른 방식으로 거래 전략을 할 수 있습니다 : 이상적인 방법, 그리고 실제 방법이 있습니다. 우리는 10 단계로 세분화 된 이상적인 개발 프로세스로 시작합니다.


이상적인 모델 기반 전략 개발


1 단계 : 모델.


이전 부분에 나열된 알려진 시장 비효율 중 하나를 선택하거나 새로운 부분을 발견하십시오. 당신은 가격 곡선을 통해 눈을 뜨고 특정 시장 행동에 의해 설명 될 수있는 의심스러운 것을 찾을 수 있습니다. 또는 다른 방법으로 행동 패턴을 이론화하고 가격에 반영되는지 확인할 수 있습니다. If you discover something new, feel invited to post it here! But be careful: Models of non-existing inefficiencies (such as Elliott Waves) already outnumber real inefficiencies by a large amount. It is not likely that a real inefficiency remains unknown to this day.


Once you’ve decided for a model, determine which price curve anomaly it would produce, and describe it with a quantitative formula or at least a qualitative criteria. You’ll need that for the next step. As an example we’re using the Cycles Model from the previous part:


(Cycles are not to be underestimated. One of the most successful funds in history – Jim Simons’ Renaissance Medallion fund – is rumored to exploit cycles in price curves by analyzing their lengths ( C i ), phases ( D i ) and amplitudes ( a i ) with a Hidden Markov Model. Don’t worry, we’ll use a somewhat simpler approach in our example.)


Step 2: Research.


Find out if the hypothetical anomaly really appears in the price curves of the assets that you want to trade. For this you first need enough historical data of the traded assets – D1, M1, or Tick data, dependent on the time frame of the anomaly. How far back? As far as possible, since you want to find out the lifetime of your anomaly and the market conditions under which it appears. Write a script to detect and display the anomaly in price data. For our Cycles Model, this would be the frequency spectrum:


EUR/USD frequency spectrum, cycle amplitude vs. cycle length in bars.


Check out how the spectrum changes over the months and years. Compare with the spectrum of random data (with Zorro you can use the Detrend function for randomizing price curves). If you find no clear signs of the anomaly, or no significant difference to random data, improve your detection method. And if you then still don’t succeed, go back to step 1.


Step 3: The algorithm.


Write an algorithm that generates the trade signals for buying in the direction of the anomaly. A market inefficiency has normally only a very weak effect on the price curve. So your algorithm must be really good in distinguishing it from random noise. At the same time it should be as simple as possible, and rely on as few free parameters as possible. In our example with the Cycles Model, the script reverses the position at every valley and peak of a sine curve that runs ahead of the dominant cycle:


This is the core of the system. Now it’s time for a first backtest. The precise performance does not matter much at this point – just determine whether the algorithm has an edge or not. Can it produce a series of profitable trades at least in certain market periods or situations? If not, improve the algorithm or write a another one that exploits the same anomaly with a different method. But do not yet use any stops, trailing, or other bells and whistles. They would only distort the result, and give you the illusion of profit where none is there. Your algorithm must be able to produce positive returns either with pure reversal, or at least with a timed exit.


In this step you must also decide about the backtest data . You normally need M1 or tick data for a realistic test. Daily data won’t do. The data amount depends on the lifetime (determined in step 2) and the nature of the price anomaly. Naturally, the longer the period, the better the test – but more is not always better. Normally it makes no sense to go further back than 10 years, at least not when your system exploits some real market behavior. Markets change extremely in a decade. Outdated historical price data can produce very misleading results. Most systems that had an edge 15 years ago will fail miserably on today’s markets. But they can deceive you with a seemingly profitable backtest.


Step 4: The filter.


No market inefficiency exits all the time. Any market goes through periods of random behavior. It is essential for any system to have a filter mechanism that detects if the inefficiency is present or not. The filter is at least as important as the trade signal, if not more – but it’s often forgotten in trade systems. This is our example script with a filter:


We apply a bandpass filter centered at the dominant cycle period to the price curve and measure its amplitude. If the amplitude is above a threshold, we conclude that the inefficiency is there, and we trade. The trade duration is now also restricted to a maximum of 10 cycles since we found in step 2 that dominant cycles appear and disappear in relatively short time.


What can go wrong in this step is falling to the temptation to add a filter just because it improves the test result. Any filter must have a rational reason in the market behavior or in the used signal algorithm. If your algorithm only works by adding irrational filters: back to step 3.


Step 5: Optimizing (but not too much!)


All parameters of a system affect the result, but only a few directly determine entry and exit points of trades dependent on the price curve. These ‘adaptable’ parameters should be identified and optimized. In the above example, trade entry is determined by the phase of the forerunning sine curve and by the filter threshold, and trade exit is determined by the exit time. Other parameters – such as the filter constants of the DominantPhase and the BandPass functions – need not be adapted since their values do not depend on the market situation.


Adaption is an optimizing procdure, and a big opportunity to fail without even noticing it. Often, genetic or brute force methods are applied for finding the “best” parameter combination at a profit peak in the parameter space. Many platforms even have “optimizers” for this purpose. Although this method indeed produces the best backtest result, it won’t help at all for the live performance of the system. In fact, a recent study (Wiecki et. al. 2016) showed that the better you optimize your parameters, the worse your system will fare in live trading! The reason of this paradoxical effect is that optimizing to maximum profit fits your system mostly to the noise in the historical price curve, since noise affects result peaks much more than market inefficiencies.


Rather than generating top backtest results, correct optimizing has other purposes:


It can determine the susceptibility of your system to its parameters. If the system is great with a certain parameter combination, but loses its edge when their values change a tiny bit: back to step 3. It can identify the parameter’s sweet spots . The sweet spot is the area of highest parameter robustness, i. e. where small parameter changes have little effect on the return. They are not the peaks, but the centers of broad hills in the parameter space. It can adapt the system to different assets, and enable it to trade a portfolio of assets with slightly different parameters. It can also extend the lifetime of the system by adapting it to the current market situation in regular time intervals, parallel to live trading.


This is our example script with entry parameter optimization:


The two optimize calls use a start value ( 1.0 in both cases) and a range ( 0.7..2.0 ) for determining the sweet spots of the two essential parameters of the system. You can identify the spots in the profit factor curves (red bars) of the two parameters that are generated by the optimization process:


Sine phase in pi/4 units Amplitude threshold in pips.


In this case the optimizer would select a parameter value of about 1.3 for the sine phase and about 1.0 (not the peak at 0.9) for the amplitude threshold for the current asset (EUR/USD). The exit time is not optimized in this step, as we’ll do that later together with the other exit parameters when risk management is implemented.


Step 6: Out-of-sample analysis.


Of course the parameter optimization improved the backtest performance of the strategy, since the system was now better adapted to the price curve. So the test result so far is worthless. For getting an idea of the real performance, we first need to split the data into in-sample and out-of-sample periods. The in-sample periods are used for training, the out-of-sample periods for testing. The best method for this is Walk Forward Analysis. It uses a rolling window into the historical data for separating test and training periods.


Unfortunately, WFA adds two more parameters to the system: the training time and the test time of a WFA cycle. The test time should be long enough for trades to properly open and close, and small enough for the parameters to stay valid. The training time is more critical. Too short training will not get enough price data for effective optimization, training too long will also produce bad results since the market can already undergo changes during the training period. So the training time itself is a parameter that had to be optimized.


A five cycles walk forward analysis (add “ NumWFOCycles = 5; ” to the above script) reduces the backtest performance from 100% annual return to a more realistic 60%. For preventing that WFA still produces too optimistic results just by a lucky selection of test and training periods, it makes also sense to perform WFA several times with slightly different starting points of the simulation. If the system has an edge, the results should be not too different. If they vary wildly: back to step 3.


Step 7: Reality Check.


Even though the test is now out-of-sample, the mere development process – selecting algorithms, assets, test periods and other ingredients by their performance – has added a lot of selection bias to the results. Are they caused by a real edge of the system, or just by biased development? Determining this with some certainty is the hardest part of strategy development.


The best way to find out is White’s Reality Check. But it’s also the least practical because it requires strong discipline in parameter and algorithm selection. Other methods are not as good, but easier to apply:


Montecarlo . Randomize the price curve by shuffling without replacement, then train and test again. Repeat this many times. Plot a distribution of the results (an example of this method can be found in chapter 6 of the Börsenhackerbuch). Randomizing removes all price anomalies, so you hope for significantly worse performance. But if the result from the real price curve lies not far east of the random distribution peak, it is probably also caused by randomness. That would mean: back to step 3.


Step 8: Risk management.


Your system has so far survived all tests. Now you can concentrate on reducing its risk and improving its performance. Do not touch anymore the entry algorithm and its parameters. You’re now optimizing the exit. Instead of the simple timed and reversal exits that we’ve used during the development phase, we can now apply various trailing stop mechanisms. 예를 들면 :


Instead of exiting after a certain time, raise the stop loss by a certain amount per hour. This has the same effect, but will close unprofitable trades sooner and profitable trades later.


This is our example script with the initial timed exit replaced by a stop loss limit that rises at every bar:


The for(open_trades) loop increases the stop level of all open trades by a fraction of the initial stop loss distance at the end of every bar.


Of course you now have to optimize and run a walk forward analysis again with the exit parameters. If the performance didn’t improve, think about better exit methods.


Step 9: Money management.


Money management serves three purposes. First, reinvesting your profits. Second, distributing your capital among portfolio components. And third, quickly finding out if a trading book is useless. Open the “Money Management” chapter and read the author’s investment advice. If it’s “invest 1% of your capital per trade”, you know why he’s writing trading books. He probably has not yet earned any money with real trading.


Suppose your trade volume at a given time t is V(t) . If your system is profitable, on average your capital C will rise proportionally to V with a growth factor c :


When you follow trading book advices and always invest a fixed percentage p of your capital, so that V (t) = p C(t) , your capital will grow exponentially with exponent p c :


Unfortunately your capital will also undergo random fluctuations, named Drawdowns . Drawdowns are proportial to the trade volume V(t) , and it can also be shown from statistical considerations that the maximum drawdown depth D max grows proportional to the square root of time t :


So, with the fixed percentage investment:


You can see that around the time T = 1/(q p) 2 a drawdown will eat up all your capital C(T) , no matter how profitable your strategy is and how you’ve choosen p ! That’s why the 1% rule is a bad advice. And why I suggest to clients not to raise the trade volume proportionally to their accumulated profit, but to its square root – at least when capital is mainly used for buffering drawdowns. Then, as long as the strategy does not deteriorate, they keep a safe distance from a margin call.


Dependent on whether you trade a single asset and algorithm or a portfolio of both, you can calculate the optimal investment with several methods. There’s the OptimalF formula by Ralph Vince , the Kelly formula by Ed Thorp , or mean/variance optimization by Harry Markowitz . Usually you won’t hard code reinvesting in your strategy, but calculate the investment volume externally, since you might want to withdraw or deposit money from time to time. This requires the overall volume to be set up manually, not by an automated process. A formula for proper reinvesting and withdrawing can be found in the Zorro manual.


Step 10: Preparation for live trading.


You can now define the user interface of your trading system. Determine which parameters you want to change in real time, and which ones only at start of the system. Provide a method to control the trade volume, and a ‘Panic Button’ for locking profit or cashing out in case of bad news. Display all trading relevant parameters in real time. Add buttons for re-training the system, and provide a method for comparing live results with backtest results, such as the Cold Blood Index. Make sure that you can supervise the system from whereever you are, for instance through an online status page. Don’t be tempted to look onto it every five minutes. But you can make a mighty impression when you pull out your mobile phone on the summit of Mt. Ararat and explain to your fellow climbers: “Just checking my trades.”


The real strategy development.


So far the theory. All fine and dandy, but how do you really develop a trading system? Everyone knows that there’s a huge gap between theory and practice. This is the real development process as testified by many seasoned algo traders:


Step 1. Visit trader forums and find the thread about the new indicator with the fabulous returns.


Step 2. Get the indicator working with a test system after a long coding session. Ugh, the backtest result does not look this good. You must have made some coding mistake. Debug. Debug some more.


Step 3. Still no good result, but you have more tricks up your sleeve. Add a trailing stop. The results now look already better. Run a week analysis. Tuesday is a particular bad day for this strategy? Add a filter that prevents trading on Tuesday. Add more filters that prevent trades between 10 and 12 am, and when the price is below $14.50, and at full moon except on Fridays. Wait a long time for the simulation to finish. Wow, finally the backtest is in the green!


Step 4. Of course you’re not fooled by in-sample results. After optimizing all 23 parameters, run a walk forward analysis. Wait a long time for the simulation to finish. Ugh, the result does not look this good. Try different WFA cycles. Try different bar periods. Wait a long time for the simulation to finish. Finally, with a 19-minutes bar period and 31 cycles, you get a sensational backtest result! And this completely out of sample!


Step 5. Trade the system live.


Step 6. Ugh, the result does not look this good.


Step 7. Wait a long time for your bank account to recover. Inbetween, write a trading book.


I’ve added the example script to the 2016 script repository. In the next part of this series we’ll look into the data mining approach with machine learning systems. We will examine price pattern detection, regression, neural networks, deep learning, decision trees, and support vector machines.


34 thoughts on “Build Better Strategies! Part 3: The Development Process”


I smell a book written by Italians….


Thanks for a great series of articles – I’m looking forward to testing out the concepts you’ve discussed. However, I failed at the first hurdle when I noticed my frequency spectrum over October 2015 didn’t match yours. Then I noticed the EURUSD spectrum says XAGUSD in the corner 🙂


Indeed, seems I’ve uploaded the wrong image.


WOW, look forward to the upcoming articles. You do such a great job condensing a great deal of info into simple and easy to read articles.


This is probably one of the best post and most important post I have read in the field. I have read some books about strategy development which are not as good as this post. You could write a book hehe … but I see you dont which means you win 🙂


These are great articles. 고맙습니다.


I’m curios to understand beside these modeling strategies, are you aware of quantitative strategies that takes into consideration broader set of more diverse datasets, like looking at economic indicators or social sentiment and combining with historical prices of different assets categories.


예. We did a couple model-based systems for clients that got additional information from the VIX or the COTR. I cannot say that using these datasets drastically improved profits, but in some cases they worked well for filters or for determining trend.


Dear Jcl, thank you so much for this blog and for your efforts in the Zorro community. I am just approaching it, and it looks like this could be really the environment where > 10 years of “puzzled” research come together!


This post is very fine, but I would ask you to go into some details about at least one point. You say: “The precise performance does not matter much at this point – just determine whether the algorithm has an edge or not”. How do you define and measure this edge? You might agree this is no trivial question, and you teach me how many ways there are to define and measure it (somebody suggesting to make it at the “signal” rather than “entry” level, see Peterson…).


For instance, if you apply your very first script to EURUSD, 1H, from 2011 to 2015, you get in the performance result a 0.98 profit factor, and average yearly loss of 5%, a Sharpe of -0.16. How do you decide to go on with research? Which are the parameters that you suggest for the first backtests? Is there a parameter-less measure of the edge? Is a SAR “system” really the best set-up for measuring edge, or this comes for instance by the application of an indicator/signal/entry logic + a filter?


These questions are where, due to the “combinatorial complexity” of possibilities (and theories around) I still start driving into the fog…


정말 고맙습니다!


This is a good question. You’ll normally write an algorithm step by step, from a first simple and raw version to the final version. At some point you have to decide whether to continue, or go back and try different ways. So you’re permanently backtesting variants. You will not necessarily get good total profits at first. But when the method has an edge, it should at least be profitable in certain market periods and situations. That’s the periods and situations that you then analyze in more detail, for finding out why your algorithm works there and not elsewhere, and how you could detect them or filter them out.


There is no simple formula, every algorithm has a different approach. The same inefficiency can be exploited with thousands of different algorithms. Maybe 90% them do not work at all because they react to slow or are too sensitive to noise or for other reasons. You must always be prepared to abandon an algorithm when you can not find at least a temporary clear edge within a reasonable amount of time.


Thank you Jcl, very useful.


I am still puzzled, though. Surely your good systems could provide a benchmark for testing some of the measures around, like the e-ratio by C. Faith, or the “acrary edge test”, and perhaps still more (information gain and the like). I think that some statistic about “signals” (before going into rules, see again Peterson) could be very valuable, also when for instance looking into data mining for finding inefficiencies. Zorro seems the ideal environment for making such tests. And, perhaps you would agree, if we want to be strict and a bit “scientific”, we should try to avoid the use of “fat words” like “edge”, if we cannot measure it.


But your “hacker” approach seems very sound and productive (more than analysis paralysis, which is often my problem, surely!).


Really enjoyed this series of articles, thanks man!


Just an FYI, for more complex parameter optimization problems I would consider multimodal global optimization algorithms over unimodal local optimization algorithms because of the characteristics of the fitness landscape and the presence non stationarity optima / regimes 🙂


This is a different philosophy of parameter optimization. Multimodal optimization finds a local maximum in an irregular fitness landscape, while unimodal optimization finds the global maximum in a rather regular landscape. Clearly, the former gets higher performance in backtests. But the question is if a system will be robust and profitable in real trading when it has an irregular fitness landscape and was optimized at a local peak. I think: no. But this would be indeed an interesting question to check out, and maybe the topic of a future study and blog post.


jcl – First off, congrats on developing quality content! I am fortunate enough to have stumbled into this and it’s going to keep me busy for sometime. One question (among many others 🙂 I have.


You say “But do not yet use any stops, trailing, or other bells and whistles. They would only distort the result..”. In my backtests of an intraday trading system, I am using fixed stop loss and profit target and is an outcome from every training interval. My assumption was, these tie into the ADR (daily range or volatility) of the recent market conditions and hence should be tuned. However, I would love to hear your inputs on this and if this creates more curve fitting risk that I don’t see.


Thanks again for putting this altogether!


Yes, you can and should absolutely use volatility dependent stops and tune them. But I suggest not to do that in the early stage when you just want to find out if your algorithm works at all. Tuning and complex exits just makes it more difficult to decide if there really is an “edge”, or “alpha”, or “truth”, or whatever you call it, to your entry algorithm.


Do you have any news about the following (a dead link):


a new article was posted on the Financial Hacker blog:


더 나은 전략을 수립하십시오! Part 4: Data Mining.


In 1996, Deep Blue was the first computer to win the chess championship. It took 20 more years until the leading Go player Lee Sedol was defeated by a computer program, AlphaGo. Deep Blue was a model based system with hardwired chess rules. AlphaGo is a data-mining system, a deep …


You received this e-mail because you asked to be notified when new articles are posted.


Thanks & Best Regards!


The Financial Hacker.


Sorry for that – it was an glitch by hitting a wrong button. I had started the article, but then something came up and I had not yet the time to finish it. But I’ll do that soon.


I did the Really-out-of-sample (ROOS) Test with 2015 historical data. My PF>1 and SR.


<1 and it give 2000pips at the end of the year. However the equity curve is flat with R=0.00.


I dont know if it make sense to go back to step 1 and try to improve R with risk control or if such a result is an indicator that my strategy has no edge from the beginning. I know it is dificult to say with just such info but I just wonder as a global question how bad or how go the ROOS has to be to keep using the strategy or to abandon it. Maybe the rule is that the strategy has to give the same results during 2015 as the backtest during the whole 2014?


The R2 value is not really relevant here, since R2 is a long-term parameter that needs a longer equity curve than only one year. There are two other questions that a ROOS test can answer: Does the result look very different to the results from any year before? And would you have started trading this system in January when you knew the end result in December?


Good to know that R2 isnt that important. 🙂


These are actually really good questions. Even Z12 taken a bad year can look not that good to go live with it. My DD, PF and MI and SR of the year in the ROOS are similar to the backtest result because there is also a flat period on the backtest too which produces similar DD. The question is if this flat period will keep on going and since I dont know yet how to filter it, it is like throwing a coin to go life. Could it be possible to use Cold Blood Index during the ROOS?


Yes, the CBI works for the ROOS period just as for live trading. The long flat periods are due to the filter – it’s not optimal here. This is not a commercial quality system, it’s only for demonstration.


답변 해주셔서 감사합니다.


I have an extrange situation now tho. My strategy past the ROOS test for the assets I prepare in the training period but I do not have any parameters optimized because I want to control the number of pips on risk per trade. However if I apply WFO then it is a disaster ( or almost ). On one side it can be due to overfitting ofc but then I do not know how the strategy can pass ROSS. On the other side I noticed in the performance report a big unbalance between long and short trades after the WFO. It looks like the most stable PF is obtained for a parameter value which actually produces only trades in one direcction and at the end, the result isnt that good. Can detrend solve that problem? Should the training consider the PF stability of long and short trades?


If I understood you right, your strategy passed the ROOS test with default parameters, but after optimizing with WFO it failed. The ROOS test must be done after WFO, not before. Otherwise it can be just a lucky selection of parameter default values. A long/short asymmetry after WFO is probably an artifact caused by a strong trend during the training periods. In that case you should indeed detrend the trade results in training.


Yes thats correct. I did not do WFO or parameter optimization the first time and I prepared the strategy so but then I begun again with a WFO to compare the strategies and in that case I got such a bad result. It is good to know that ROOS has to be done after WFO and that WFO is mandatory.


I detrended it and the problem was still there. It was indeed an artifact because I found out that the trades were placed in the wrong side for some of the assets due to a too big rollover so I probably updated the asset list on a wrong day.


멋진 기사. Just beginning my algorithmic trading journey and I often refer back to this article when developing. You mention that “Your algorithm must be able to produce positive returns either with pure reversal, or at least with a timed exit.”


It seems that the suggestion here is to leave the trade after a reversal is detected, or when, let’s say, n candles have passed since the entry of the trade. Is this not highly dependent on how you define 1) a reversal and 2) the size n?


It seems that this too also introduces some selection bias into the initial steps of developing an algorithm.


No, with “reversal” I mean a trade reversal, not a price reversal. The algorithm opens a short trade, and this closes a long position, or vice versa. Most algorithms are symmetric, so they can go long or short.


Exceptions are long-only strategies for stocks or ETFs. They do not reverse, so you need some other means for closing a trade. In most cases the algorithm still produces a native close signal that is the opposite of the open signal. If not, you must use a timed exit. For determining n, you normally plot a price profile at trade entry. Zorro has a function for plotting such a profile. n is then a point after the price turns back.


Jcl thanks for the prompt reply!


It looks like a simple straight forward process. Find an indicator which gives a SR>1 on a test with a simple script in some assets and you are ready to go. The question could be: Is there a certain minimun amount of assets which have to give good results with the simple script in order to ensure that it has an edge or is it enough if just one/two/three assets produce good results?


I said that the process looks simple because it gets kind of more complicate when more assets and algos has to be added. In the tutorial it is written that at least 10 algos and 10 assets have to be combined in order to create a robuts strategy. I struggle in this part because eventhough I can find some algos which behave ok with the reversal script, I am not sure what is the right way to proceed when it is time to combine them.


Has this step-by-step framework protocol been empirically studied to determine its efficacy/reliability? How many systems generated and undergone such robustness tests using the whole procedure described above, have turned out to be profitable under live forward tests (and for how long)? Can we quantify all the results of the number of systems that failed these tests vs. the number of systems that have passed? Are there verified real accounts to provide evidence of efficacy for this particular framework? Has anybody attempted to compare this framework to Michael Harris’ [advertisement link removed] ?


Please, advertise your software on your own website, not on my blog. 고맙습니다. & # 8211; Assuming the question was serious: This article is not about a new invented “framework” for trade systems, or something like that. I’m describing the standard process of building a software model. This works in a similar way with any predictive model, not necessarily for trading.


Nice article, thanks JCL. Just one note on money management. According to Magdon-Ismail scaling of the expected MDD with T undergoes a phase transition from T to √T to log T as µ changes from negative to zero to positive. A drawdown will eat up all your capital C(T) at some time, but it’ll take more time. For example for a system with Kelly 12.5 it won’t take 40 years (for √T scaling) but something like 1 million years (for log T scaling).


This is correct; in the strong sense the √T scaling is only valid for systems with neither positive nor negative expectancy. But there are more factors involved. Magdon-Ismail considered a drift term µ > 0, which increases the time until crash, but did not consider a (very likely) autocorrelation of the results, which reduces the time until crash. So with assuming a √T scaling you’re more on the safe side than with log T.

Comments

Popular Posts