좋은 알고리즘 거래 전략


QuantStart.
빠르게 성장하는 소매점 퀀텀 트레이더 커뮤니티를 지원하는 Quantcademy 개인 회원 포털에 가입하십시오. 당신은 당신의 가장 중요한 퀀트 트레이딩 질문에 대답 할 준비가되어있는 지식이 풍부하고 마음이 맞는 퀀트 트레이더 그룹을 찾을 수 있습니다.
퀀트 트레이딩에 관한 나의 eBook을 확인해보십시오. 여기서 저는 파이썬 툴로 수익성 높은 체계적인 트레이딩 전략을 만드는 법을 가르쳐드립니다.
Python 및 R을 사용하여 시계열 분석, 기계 학습 및 베이지안 통계를 사용하는 고급 거래 전략에 관한 새로운 전자 책을 살펴보십시오.
2013 년 4 월 19 일 Michael Halls-Moore 작성
이 기사에서는 수익성있는 알고리즘 거래 전략을 식별하는 방법을 소개하고자합니다. 오늘 우리의 목표는 그러한 시스템을 찾고 평가하고 선택하는 방법을 자세하게 이해하는 것입니다. 어떻게 전략을 식별하는 것이 개인의 선호에 관한 것인가, 전략 수행 성과, 테스트를위한 과거 데이터의 유형과 양을 결정하는 방법, 거래 전략을 냉정하게 평가하는 방법, 마지막으로 백 테스트 단계로 진행하는 방법을 설명합니다. 전략 구현.
거래를위한 자신 만의 개인 선호도 확인.
성공적인 거래자가되기 위해서는 - 임의적으로 또는 알고리즘 적으로 - 정직한 질문을하는 것이 필요합니다. 트레이딩은 놀라운 속도로 돈을 잃을 수있는 능력을 제공하므로 선택한 전략을 이해하는 데 필요한만큼 "자신을 알아야합니다".
나는 거래에서 가장 중요한 고려 사항이 자신의 성격을 인식하고 있다고 말할 수 있습니다. 특히 거래 및 알고리즘 거래는 상당한 수준의 규율, 인내심 및 정서적 인 분리가 필요합니다. 알고리즘이 당신을 위해 당신의 거래를 수행하게하기 때문에, 그것이 실행될 때 전략에 간섭하지 않도록 해결할 필요가 있습니다. 이것은 특히 드로우 다운이 연장 된 기간에 매우 어려울 수 있습니다. 그러나 백 테스트에서 수익성이 높은 것으로 입증 된 많은 전략은 단순한 간섭으로 인해 망가질 수 있습니다. 당신이 알고리즘 트레이딩의 세계에 들어가기를 원한다면 감정적으로 테스트 될 것이며 성공하기 위해서는 이러한 어려움을 극복해야한다는 것을 이해하십시오!
다음 고려 사항은 시간 중 하나입니다. 풀 타임 직업이 있습니까? 파트 타임으로 일하십니까? 당신은 집에서 일하거나 매일 통근 통근을합니까? 이 질문은 귀하가 추구해야 할 전략의 빈도를 결정하는 데 도움이됩니다. 정규직 근무자의 경우, 일일 선물 전략이 적절하지 않을 수 있습니다 (적어도 완전히 자동화 될 때까지!). 시간 제약으로 인해 전략의 방법론이 결정됩니다. 당신의 전략이 빈번히 거래되고 값 비싼 뉴스 피드 (예 : 블룸버그 터미널)에 의존한다면 분명히 사무실에서이 전략을 성공적으로 실행할 수있는 능력에 대해 현실적이어야합니다! 많은 시간을 투자 한 사람들이나 전략을 자동화하는 기술을 배우려면보다 기술적 인 고 빈도 거래 (HFT) 전략을 고려할 수 있습니다.
일관되게 수익성있는 포트폴리오를 유지하려면 거래 전략에 대한 지속적인 연구가 필요하다는 것이 나의 믿음입니다. "전략의 밑에 레이다"영원히 체재하십시오. 따라서 거래에 할당되는 상당 부분은 지속적인 연구 수행에 있습니다. 강력한 수익성 또는 손실에 대한 완만 한 쇠퇴의 차이가 될 수 있기 때문에 이것을 할 준비가되어 있는지 여부를 자문 해보십시오.
또한 거래 자본을 고려해야합니다. 양적 전략에 대해 일반적으로 받아 들여지는 이상적인 최소 금액은 50,000 USD입니다 (영국에서는 약 £ 35,000). 제가 다시 시작한다면, 아마 더 많은 금액, 아마 100,000 USD (약 £ 70,000)로 시작합니다. 그 이유는 중개 및 고주파 전략에서 거래 비용이 극도로 비싸기 때문이며 인출시 자본을 충분히 흡수 할 필요가 있기 때문입니다. 10,000 달러 미만으로 시작하는 것을 고려하고 있다면 거래 비용이 급격히 수익에 반영되므로 하나 또는 두 개의 자산으로 거래하는 저주파수 전략으로 제한해야합니다. 인터랙티브 브로커는 프로그래밍 기술을 가진 사람들에게 가장 친숙한 중개업자 중 하나 인 API로 인해 소매 계좌 최소 10,000 USD를 보유하고 있습니다.
프로그래밍 기술은 자동화 된 알고리즘 거래 전략을 수립하는 데 중요한 요소입니다. C ++, Java, C #, Python 또는 R과 같은 프로그래밍 언어에 익숙하면 엔드 투 엔드 데이터 저장소, 백 테스트 엔진 및 실행 시스템을 직접 만들 수 있습니다. 여기에는 여러 가지 장점이 있는데, 그 중 하나는 거래 인프라의 모든 측면을 완전히 인식 할 수있는 능력입니다. 또한 "기술 스택"을 완벽하게 제어 할 수 있도록 고주파수 전략을 탐색 할 수 있습니다. 이는 자신의 소프트웨어를 테스트하고 버그를 제거 할 수 있음을 의미하지만, 적어도 알 고 트레이딩 경력의 초기 부분에서는 인프라를 코딩하는 데 더 많은 시간을 소비하고 전략을 구현하는 데 더 적은 시간을 소비합니다. Excel 또는 MATLAB 거래가 편리하고 다른 구성 요소의 개발을 아웃소싱 할 수 있습니다. 그러나 나는 특히 높은 빈도로 거래하는 사람들에게 이것을 권장하지 않습니다.
알고리즘 거래를 통해 무엇을 성취하고자하는지 스스로 자문 해봐야합니다. 정기 수입에 관심이 있습니까? 이를 통해 귀하의 트레이딩 계좌에서 수입을 얻을 수 있습니다. 또는 장기 자본 이득에 관심이 있습니까? 그리고 자금을 인출 할 필요없이 거래 할 수 있습니까? 소득 의존성은 전략의 빈도를 결정합니다. 보다 정기적으로 수입을 인출하려면 변동성이 적은 (즉, 높은 Sharpe 비율) 고주파 거래 전략이 필요합니다. 장기 트레이더는보다 조용한 거래 빈도를 제공 할 수 있습니다.
마지막으로, 짧은 시간 안에 극도로 부유하게되는 개념에 속지 마십시오! Algo 거래는 부유 한 빠른 계획이 아닙니다. 무엇이든지 가난한 빠른 계획이 될 수있는 경우. 알고리즘 거래에 성공하려면 상당한 훈련, 연구, 부지런함 및 인내가 필요합니다. 일관성있는 수익성을 창출하는 데 몇 년이 걸릴 수도 있습니다.
소싱 알고리즘 거래 아이디어.
반대로 일반적인 인식에도 불구하고, 실제로 공개 도메인에서 수익성있는 거래 전략을 찾는 것은 매우 직접적입니다. 결코 오늘보다 더 쉽게 거래 아이디어를 구할 수 없었습니다. 학술 재무 저널, 인쇄 전 서버, 거래 블로그, 거래 포럼, 주간 거래 잡지 및 전문 텍스트는 아이디어를 바탕으로 수천 가지의 거래 전략을 제공합니다.
양적 거래 연구자로서의 우리의 목표는 지속적인 거래 아이디어를 제공 할 수있는 전략 파이프 라인을 수립하는 것입니다. 이상적으로 우리는 우리가 만나는 전략을 소싱, 평가 및 구현하는 체계적인 접근 방식을 만들고 싶습니다. 파이프 라인의 목표는 일정한 양의 새로운 아이디어를 생성하고 최소한의 감정적 인 배려로 이러한 아이디어의 대부분을 거부 할 수있는 틀을 제공하는 것입니다.
우리는인지 적 편향이 의사 결정 방법에 영향을 미치지 않도록 극도로주의해야합니다. 이것은 하나의 자산 클래스를 다른 자산 클래스보다 선호하는 것처럼 간단 할 수 있습니다 (금 및 기타 귀금속이 마음에 들었습니다). 왜냐하면 그들은 더 이국적인 것으로 인식되기 때문입니다. 우리의 목표는 항상 긍정적 인 기대와 함께 지속적으로 수익성있는 전략을 찾는 것입니다. 자산 클래스의 선택은 거래 자본 제약, 중개 수수료 및 레버리지 기능과 같은 다른 고려 사항을 기반으로해야합니다.
당신이 무역 전략의 개념에 완전히 익숙하지 않다면 처음 보는 것은 설립 된 교과서를 사용하는 것입니다. 클래식 텍스트는 양적 거래에 익숙해 지도록보다 간단하고 직관적 인 다양한 아이디어를 제공합니다. 다음은 목록을 통해 작업 할 때 점차 정교 해지는 양적 거래에 익숙하지 않은 사람들에게 내가 추천하는 선택입니다.
양적 거래 도서 목록을 더 보려면 QuantStart 독서 목록을 방문하십시오.
다음으로는 거래 포럼 및 거래 블로그를 통해보다 정교한 전략을 찾을 수 있습니다. 그러나주의 사항 : 많은 거래 블로그는 기술 분석의 개념에 의존합니다. 기술적 분석에는 자산 가격의 추세 또는 반전 패턴을 결정하기 위해 기본 지표 및 행동 심리를 활용하는 것이 포함됩니다.
전체 거래 공간에서 매우 인기가 있음에도 불구하고 기술적 분석은 양적 금융 분야에서 다소 비효율적 인 것으로 간주됩니다. 일부 사람들은 별자리를 읽거나 예측력면에서 차를 연구하는 것보다 낫지 않다고 제안했습니다. 실제로 기술적 인 분석을 이용하는 성공적인 개인이 있습니다. 그러나보다 정교한 수학 및 통계 툴박스를 갖춘 콴트로서 우리는 그러한 "TA 기반"전략의 효과를 쉽게 평가하고 정서적 고려 또는 선입견에 기초하지 않고 데이터 기반 결정을 내릴 수 있습니다.
다음은 잘 알려진 알고리즘 거래 블로그 및 포럼의 목록입니다.
보다 간단한 전략을 평가 한 경험이 있으면보다 정교한 학업을 검토해야합니다. 구독료가 높거나 일회성 비용이 들지 않으면 일부 학술지에 액세스하기 어려울 수 있습니다. 대학의 회원 또는 동창 인 경우 이러한 재정적 저널 중 일부에 대한 액세스 권한을 얻을 수 있어야합니다. 그렇지 않으면 동료 검토가 진행되는 학술 논문 초안의 인터넷 저장소 인 인쇄 전 서버를 볼 수 있습니다. 우리가 성공적으로 복제하고 수익을 얻으려는 전략에만 관심이 있기 때문에 동료 평가는 우리에게별로 중요하지 않습니다.
학술 전략의 주된 단점은 종종 시대에 뒤떨어 지거나 모호하고 값 비싼 과거 데이터가 필요하거나 비유 동 자산 클래스에서 거래되거나 수수료, 미끄러짐 또는 확산을 고려하지 않을 수 있다는 것입니다. 또한 거래 전략이 시장 주문, 주문 제한 또는 중지 손실 등을 포함하는지 여부도 분명하지 않을 수 있습니다. 따라서 가능한 한 최선을 다해 전략을 반복적으로 재 테스트하고 현실적인 거래를 추가하는 것이 절대적으로 중요합니다 당신이 거래하고자하는 자산 클래스의 많은 측면을 포함하는 비용.
다음은 아이디어를 얻을 수있는 인기있는 사전 인쇄 서버 및 재무 저널 목록입니다.
자신의 양적 전략을 수립하는 것은 어떻습니까? 일반적으로 다음 범주 중 하나 이상의 전문 지식이 필요합니다.
시장 미세 구조 - 특히 고주파 전략의 경우 시장 미세 구조, 즉 수익성을 창출하기 위해 주문서 역학을 이해할 수 있습니다. 각기 다른 시장에는 다양한 기술 제한, 규제, 시장 참여자 및 특정 전략을 통한 착취에 대한 제약이있을 것입니다. 이것은 매우 정교한 분야이며, 소매업 종사자는이 분야에서 경쟁이 어렵다는 것을 알게 될 것입니다. 특히, 경쟁에는 강력한 기술적 능력을 갖춘 대규모의 잘 자본화 된 양적 헤지 펀드가 포함됩니다. 펀드 구조 - 연금 펀드, 민간 투자 파트너십 (헤지 펀드), 상품 거래 자문 및 뮤추얼 펀드와 같은 공동 투자 펀드는 대규모 규제와 대규모 자본 보유로 인해 제약을받습니다. 따라서 좀 더 민첩한 사람에게는 일정한 일관된 행동이 악용 될 수 있습니다. 예를 들어, 대규모 자금은 규모 때문에 용량 제약을받을 수 있습니다. 따라서 대량의 유가 증권을 신속하게 적재 (판매)해야하는 경우 "시장 이동"을 피하기 위해 비틀 거리게됩니다. 정교한 알고리즘은 자금 구조 차익 거래로 알려진 일반적인 프로세스에서이 특이성 및 기타 특이성을 이용할 수 있습니다. 기계 학습 / 인공 지능 - 최근 몇 년 동안 금융 시장에서 기계 학습 알고리즘이 널리 보급되었습니다. Naive-Bayes 등의 분류 자 ​​(Classifier)와 비선형 함수 계산자 (신경망) 및 최적화 루틴 (유전 알고리즘)은 모두 자산 경로를 예측하거나 거래 전략을 최적화하는 데 사용되었습니다. 이 분야에 대한 배경 지식이 있다면 특정 알고리즘이 특정 시장에 어떻게 적용될 수 있는지에 대한 통찰력을 가질 수 있습니다.
물론 퀀트가 조사 할 수있는 많은 분야가있다. 이후 기사에서 맞춤 전략을 세우는 방법에 대해 자세히 설명합니다.
매주 또는 심지어 매일 이러한 소스를 지속적으로 모니터링함으로써 다양한 소스의 일관된 전략 목록을받을 수 있습니다. 다음 단계는 시간 낭비를 최소화하고 수익성이 없을 것으로 예상되는 전략에 대한 자원을 다시 테스트하는 방법으로 이러한 전략의 큰 부분 집합을 거부하는 방법을 결정하는 것입니다.
거래 전략 평가.
첫 번째, 그리고 틀림없이 가장 분명한 고려 사항은 실제로 전략을 이해하는지 여부입니다. 간결하게 전략을 설명 할 수 있습니까? 아니면 일련의 경고와 끝없는 매개 변수 목록이 필요합니까? 또한, 전략은 실제로 좋은, 견고한 기반을 가지고 있습니까? 예를 들어, 당신이 시도하고있는 패턴을 유발할 수있는 행동 적 근거 또는 자금 구조 제약을 지적 할 수 있습니까? 이 제약은 극적인 규제 환경의 혼란과 같은 정권 교체를 견디겠습니까? 전략은 복잡한 통계 또는 수학적 규칙에 의존합니까? 모든 금융 시계열에 적용됩니까 아니면 수익성이 있다고 주장되는 자산 클래스에만 해당합니까? 새로운 거래 방법을 평가할 때 이러한 요소에 대해 끊임없이 생각해야합니다. 그렇지 않으면 무익한 전략을 백 테스팅하고 최적화하는 데 많은 시간을 낭비 할 수 있습니다.
일단 전략의 기본 원칙을 이해했다면, 앞서 언급 한 성격 프로파일에 맞는지 여부를 결정해야합니다. 이것은 소리가 나지 않는 막연한 고려 사항은 아닙니다! 전략은 성능 특성이 크게 다를 것입니다. 더 중요한 기간의 인출을 처리하거나 더 큰 수익을 위해 더 큰 위험을 감수하고자하는 특정 성격 유형이 있습니다. 우리가 퀀트 (quants)로서 가능한 한 많은인지 적 편향을 시도하고 제거하고, 전략을 조심스럽게 평가할 수 있어야 함에도 불구하고, 편향은 항상 내재되어 있습니다. 따라서 우리는 전략의 성과를 평가할 수있는 일관성 있고 감정적 인 수단이 필요합니다 . 다음은 내가 잠재적 인 새로운 전략을 판단 할 수있는 기준 목록입니다.
방법론 - 전략 모멘텀은 시장 중심, 방향성, 방향성이 있습니까? 전략은 이해하기 어렵고 통계에서 박사 학위를 요구하는 정교한 (또는 복잡한!) 통계 또는 기계 학습 기술에 의존합니까? 이러한 기술로 인해 상당한 양의 매개 변수가 도입되어 최적화 편향으로 이어질 수 있습니까? 전략이 체제 변화 (즉, 금융 시장의 잠재적 새로운 규제)에 견딜 수있을 것인가? Sharpe Ratio - Sharpe 비율은 경험적으로 전략의 보상 / 위험 비율의 특성을 나타냅니다. 그것은 주식 곡선에 의해 견디는 변동성 수준에 대해 얼마나 많은 수익을 낼 수 있는지를 정량화합니다. 당연히, 우리는 이러한 수익률과 변동성 (즉, 표준 편차)이 측정되는 기간과 빈도를 결정해야합니다. 보다 높은 빈도 전략은 표준 편차의 샘플링 속도가 더 빨라지지만 예를 들어 전체 측정 시간이 더 짧아야합니다. 레버리지 - 수익성을 위해 전략에 상당한 영향력이 필요합니까? 전략은 수익을 내기 위해 레버리지 파생 상품 (선물, 옵션, 스왑)의 사용을 필요로합니까? 이러한 레버리지 계약은 큰 변동성을 특징으로 할 수 있으며 따라서 마진 콜을 쉽게 유도 할 수 있습니다. 그러한 변동성에 대한 거래 자본과 기질이 있습니까? 빈도 - 전략의 빈도는 기술 스택 (기술적 전문성), 샤프 비율 및 전반적인 거래 비용 수준과 밀접하게 관련되어 있습니다. 고려해야 할 다른 모든 문제, 높은 빈도 전략은 더 많은 자본을 필요로하며, 구현하기가 더 정교하고 어렵습니다. 그러나 백 테스팅 엔진이 정교하고 버그가없는 것으로 가정하면 훨씬 높은 Sharpe 비율을 갖게됩니다. 변동성 - 변동성은 전략의 "위험"과 강하게 관련됩니다. Sharpe 비율은 이것을 특징으로합니다. 기초 자산 군의 변동성이 크지 않다면 주식 곡선의 변동성이 커지며 샤프 비율도 작아진다. 나는 물론 긍정적 인 변동성이 거의 네거티브 변동성과 같다고 가정하고 있습니다. 일부 전략은 더 큰 불리한 변동성을 가질 수 있습니다. 이러한 속성을 알고 있어야합니다. 승패, 평균 손익 - 전략은 승패와 평균 손익 특성이 다릅니다. 잃어버린 거래의 수가 승리 한 거래의 수를 초과하더라도 매우 수익률 높은 전략을 가질 수 있습니다. 기세 전략은 수익성이 있기 위해 소수의 "대히트"에 의존하기 때문에이 패턴을 갖는 경향이 있습니다. 평균 회귀 전략은 거래가 "승리자"인 경우 반대되는 경향이 있지만 손실 거래는 매우 심할 수 있습니다. 최대 인출 - 최대 인출은 전략의 지분 곡선에서 가장 큰 전체적인 최저가 하락률입니다. 기세 전략은 장기간의 축소 (많은 증분 손실 거래로 인한 손실)로 고통받는 것으로 잘 알려져 있습니다. 역사적 테스트에서 이것이 전략과 관련하여 "통상적 인 업무"라고 제안한 경우에도 많은 상인은 연장 된 인출 기간에 포기할 것입니다. 당신은 당신의 전략 거래를 중단하기 전에 어느 정도의 연체율 (그리고 어느 기간 동안)을 받을지 결정할 필요가 있습니다. 이는 매우 개인적인 결정이므로 신중하게 고려해야합니다. 용량 / 유동성 - 소매 수준에서, 당신이 (비상주 주식처럼) 고도로 유동성이없는 수단으로 거래하지 않는 한, 당신은 전략 능력에 크게 신경 쓰지 않아도됩니다. 용량은 전략의 추가 자본에 대한 확장 성을 결정합니다. 대형 헤지 펀드의 대부분은 자본 배분에서 전략이 증가함에 따라 상당한 용량 문제로 어려움을 겪습니다. 매개 변수 - 특정 전략 (특히 기계 학습 커뮤니티에있는 전략)에는 많은 양의 매개 변수가 필요합니다. 전략에 필요한 추가 매개 변수가 있으면 최적화 바이어스 ( "곡선 맞춤"이라고도 함)에 취약 해집니다. 가능한 한 적은 수의 매개 변수로 전략을 목표로 삼거나 전략을 테스트 할 수있는 충분한 양의 데이터가 있는지 확인해야합니다. 벤치 마크 - 거의 모든 전략 ( "절대 수익"으로 특징 지우지 않는 한)은 일부 성능 벤치 마크에 비해 측정됩니다. 벤치 마크는 일반적으로 전략이 거래하는 기본 자산 클래스의 큰 샘플을 특성화하는 지수입니다. 전략이 대형 미국 주식을 거래하는 경우 S & P500은 전략을 측정하는 자연스러운 벤치 마크가됩니다. 이 유형의 전략에 적용되는 용어 "알파"및 "베타"가 들립니다. 이 계수에 대해서는 이후 기사에서 자세히 다룰 것입니다.
전략의 실제 수익률에 대해서는 언급하지 않았습니다. 왜 이런거야? 이와는 별도로 수익률은 실제로 전략의 효과에 대한 제한된 정보를 제공합니다. 그들은 레버리지, 변동성, 벤치 마크 또는 자본 요구 사항에 대한 통찰력을주지 못합니다. 따라서 전략은 드물게 자신의 수익만으로 판단됩니다. 수익을보기 전에 항상 전략의 위험 요소를 고려하십시오.
이 단계에서 귀사의 파이프 라인에서 발견되는 많은 전략은 자본 요건, 레버리지 제약, 최대 인출 허용 오차 또는 변동성 선호도를 충족시키지 않기 때문에 거부됩니다. 남아있는 전략은 이제 백 테스트로 고려 될 수 있습니다. 그러나 이것이 가능하기 전에 이러한 전략을 테스트 할 수있는 사용 가능한 과거 데이터의 최종 거부 기준을 고려해야합니다.
내역 데이터 얻기.
요즘에는 과거 데이터 저장을위한 자산 클래스 전반에 걸친 기술적 요구 사항의 폭이 넓습니다. 경쟁 우위를 유지하기 위해 구매자 (펀드)와 매도자 측 (투자 은행) 모두 기술 인프라에 막대한 투자를합니다. 그것의 중요성을 고려하는 것이 필수적입니다. 특히 적시성, 정확성 및 저장 요구 사항에 관심이 있습니다. 이제는 이력 데이터를 얻는 기본 및 저장 방법에 대해 간략하게 설명하겠습니다. 불행히도 이것은 매우 깊고 기술적 인 주제이므로이 기사의 모든 내용을 말할 수는 없습니다. 그러나 필자는 금융 산업에서의 이전 업계 경험이 주로 금융 데이터 수집, 저장 및 액세스에 관심을 가졌으므로 향후이 점에 대해 더 많이 쓰겠습니다.
이전 섹션에서는 우리 자신의 개인 거부 기준에 따라 특정 전략을 거부 할 수있는 전략 파이프 라인을 설정했습니다. 이 섹션에서는 과거 데이터를 얻으려는 우리 자신의 선호도에 따라 더 많은 전략을 필터링 할 것입니다. 주요 고려 사항 (특히 소매 실무자 수준)은 데이터 비용, 저장 요구 사항 및 기술 전문성 수준입니다. 우리는 또한 다양한 유형의 사용 가능한 데이터와 각 유형의 데이터가 우리에게 부과 할 다양한 고려 사항을 논의해야합니다.
사용 가능한 데이터의 유형과 고려해야 할 핵심 쟁점에 대해 논의하겠습니다.
기초 데이터 - 금리, 인플레이션 수치, 기업 활동 (배당, 주식 분할), SEC 신고, 기업 회계, 수익 수치, 작물보고, 기상 데이터 등과 같은 거시 경제 동향에 관한 데이터를 포함합니다. 가치있는 회사 또는 기타 자산을 기초로, 즉 미래의 예상 현금 흐름을 통해 제공해야합니다. 주식 가격 시리즈는 포함되지 않습니다. 일부 기본 데이터는 정부 웹 사이트에서 무료로 사용할 수 있습니다. 다른 장기간의 역사적인 기초 자료는 극도로 비쌀 수 있습니다. 수천 개의 회사가 한 번에 연구되지 않는 한, 스토리지 요구 사항은 대개 크지 않습니다. 뉴스 데이터 - 뉴스 데이터는 본질적으로 정 성적입니다. 기사, 블로그 게시물, 마이크로 블로그 게시물 ( "트윗") 및 사설로 구성됩니다. 감정을 해석하기 위해 분류 자와 같은 기계 학습 기술이 자주 사용됩니다. 이 데이터는 언론 매체를 통한 구독을 통해 종종 무료 또는 저렴한 가격으로 제공됩니다. 새로운 "NoSQL"문서 저장소 데이터베이스는 이러한 유형의 비정형, 정 성적 데이터를 저장하도록 설계되었습니다. 자산 가격 데이터 - 이것은 퀀트의 전통적인 데이터 도메인입니다. 자산 가격의 시계열로 구성됩니다. 주식 (주식), 채권 (채권), 상품 및 환율은 모두이 클래스에 포함됩니다. 주식 등의보다 간단한 자산 클래스를 얻기 위해서는 매일의 과거 데이터가 종종 간단합니다. 그러나 정확성과 청결도가 포함되고 통계 편향이 제거되면 데이터가 비쌀 수 있습니다. 또한 시계열 데이터는 특히 일중 데이터를 고려할 때 중요한 저장소 요구 사항을 가지고 있습니다. 금융 상품 - 주식, 채권, 선물 및 이국적인 파생 상품 옵션은 특성과 매개 변수가 매우 다릅니다. 따라서이를 수용 할 수있는 "한 가지 크기의 모든 것"데이터베이스 구조는 없습니다. 다양한 금융 상품에 대한 데이터베이스 구조의 설계 및 구현에 상당한주의를 기울여야합니다. 우리는 향후 기사에서 유가 증권 마스터 데이터베이스를 구축 할 때 그 상황을 충분히 논의 할 것입니다. 빈도 - 데이터의 빈도가 높을수록 비용 및 저장 요구 사항이 커집니다. 저주파 전략의 경우 일일 데이터로 충분할 수 있습니다. 고 빈도 전략의 경우 틱 수준의 데이터와 특정 거래 교환 주문서 데이터의 기록 사본을 얻는 것이 필요할 수 있습니다. 이러한 유형의 데이터를위한 스토리지 엔진을 구현하는 것은 기술적으로 집중적이며 프로그래밍 / 기술적 배경이 강한 사람들에게만 적합합니다. 벤치 마크 - 위에서 설명한 전략은 종종 벤치 마크와 비교됩니다. 이것은 일반적으로 추가 금융 시간 시리즈로 나타납니다. 주식의 경우 S & P500 지수 (US) 또는 FTSE100 (UK)과 같은 국가 주식 벤치 마크입니다. 고정 수입 기금의 경우 채권 또는 채권 바구니와 비교하는 것이 유용합니다. "무위험 이자율"(즉, 적절한 이자율)은 널리 받아 들여지는 또 다른 벤치 마크입니다. 모든 자산 클래스 카테고리에는 선호되는 벤치 마크가 있으므로 외부 전략에 관심을 가지려면 특정 전략에 따라이를 조사해야합니다. 기술 - 재무 데이터 저장 센터 뒤의 기술 스택은 복잡합니다. 이 기사에서는 건물을 짓는 것과 관련된 것에 대해서만 표면을 긁을 수 있습니다. 그러나 MySQL, SQL Server, Oracle 또는 Document Storage Engine (예 : "NoSQL")과 같은 관계형 데이터베이스 관리 시스템 (RDBMS)과 같은 데이터베이스 엔진을 중심으로합니다. 데이터베이스를 쿼리하고 MATLAB, R 또는 Excel과 같은 외부 도구에 대한 액세스를 제공하는 "비즈니스 로직"응용 프로그램 코드를 통해 액세스 할 수 있습니다. 종종이 비즈니스 로직은 C ++, C #, Java 또는 Python으로 작성됩니다. 또한 개인용 컴퓨터 또는 인터넷 서버를 통해 원격으로이 데이터를 어딘가에 호스팅해야합니다. Amazon Web Services와 같은 제품은 최근 몇 년 동안이 방법을 더 간단하고 저렴하게 만들었지 만 강력한 기술력을 필요로합니다.
위에서 볼 수 있듯이 일단 전략이 파이프 라인을 통해 확인되면 특정 과거 데이터의 가용성, 비용, 복잡성 및 구현 세부 사항을 평가해야합니다. 과거 데이터 고려 사항만을 토대로 전략을 거부 할 필요가 있음을 알 수 있습니다. 이것은 큰 영역이며 PhD 팀은 가격이 정확하고시기 적절한지 확인하기 위해 대규모 기금에서 일합니다. 백 테스팅을위한 강력한 데이터 센터를 만드는 어려움을 과소 평가하지 마십시오!
그러나 많은 백 테스팅 플랫폼이 비용을 들이지 않고 자동으로이 데이터를 제공 할 수 있다고 말하고 싶습니다. 따라서 구현 통증을 당신에게서 멀리 벗어나게되고, 당신은 순전히 전략 구현과 최적화에 집중할 수 있습니다. TradeStation과 같은 도구에는이 기능이 있습니다. 그러나 내 개인적인 관점은 가능한 한 많은 것을 내부적으로 구현하고 스택의 일부를 소프트웨어 공급 업체에 아웃소싱하는 것을 피하는 것입니다. 더 매력적인 Sharpe 비율로 인해 더 높은 빈도 전략을 선호하지만 첨단 최적화가 중요한 기술 스택과 긴밀하게 결합되는 경우가 많습니다.
이제는 과거 데이터를 둘러싼 문제에 대해 논의한 결과 백 테스트 엔진에서 전략을 구현할 때입니다. 이것은 토론의 동등한 큰 영역이기 때문에 다른 기사의 주제가 될 것입니다!
양적 거래 시작하기?
QuantStart 목록을 구독해야하는 3 가지 이유 :
1. 퀀트 트레이딩 레슨.
계량 거래를 시작하는 데 도움이되는 힌트와 팁으로 가득한 무료 10 일간 코스에 즉시 액세스 할 수 있습니다!
2. 모든 최신 내용.
매주 나는 퀀트 스타트에서 모든 활동의 포장을 보내드릴 것입니다. 그래서 당신은 결코 다시 글을 놓치지 않을 것입니다.
현실감 넘치는 퀀 트레이딩 팁.

알고리즘 트레이딩의 기초 : 개념과 예제.
알고리즘은 작업 또는 프로세스를 수행하기 위해 명확하게 정의 된 지침 집합입니다.
알고리즘 트레이딩 (자동 트레이딩, 블랙 박스 트레이딩, 또는 단순한 알 고 트레이딩)은 a 컴퓨터가 불가능한 속도와 빈도로 이익을 창출하기 위해 거래를하기 위해 정의 된 명령어 세트를 따르도록 프로그래밍 된 컴퓨터를 사용하는 프로세스입니다. 인간 상인. 정의 된 규칙 집합은 타이밍, 가격, 수량 또는 모든 수학적 모델을 기반으로합니다. 상인에 대한 이익 기회와는 별도로, 알 고향 거래는 시장을보다 유동적으로 만들고 무역 활동에 대한 정서적 인적 영향을 배제함으로써보다 체계적인 거래를 만듭니다. (자세한 내용은 올바른 알고리즘 트레이딩 소프트웨어 선택을 확인하십시오.)
거래자가 다음과 같은 간단한 거래 기준을 따랐다 고 가정 해보십시오.
50 일 이동 평균이 200 일 이동 평균보다 커지면 50주의 주식을 매수하십시오. 50 일 이동 평균이 200 일 이동 평균보다 낮아지면 주가는 주식의 주식을 매도합니다.
이 두 가지 간단한 지침 세트를 사용하면 정의 된 조건이 충족 될 때 주가 및 이동 평균 지표를 자동으로 모니터링하고 구매 및 판매 주문을하는 컴퓨터 프로그램을 작성하기 쉽습니다. 상인은 더 이상 실시간 가격 및 그래프를 감시하거나 수동으로 주문할 필요가 없습니다. 알고리즘 거래 시스템은 거래 기회를 정확하게 식별함으로써 자동으로 거래를 수행합니다. 이동 평균에 대한 자세한 내용은 단순 이동 평균을 참조하십시오.
[입증 된 전략과 궁극적으로 알 고리즘 트레이딩 시스템으로 작업 할 수있는 포인트 전략에 대해 자세히 알고 싶다면, Investopedia Academy의 Become a Day Trader 코스를 확인하십시오. ]
알고리즘 트레이딩의 이점.
Algo-trading은 다음과 같은 이점을 제공합니다.
가능한 최상의 가격으로 실행되는 거래 신속하고 정확한 거래 주문 배치 (따라서 원하는 수준의 실행 가능성 높음) 중요한 가격 변동을 피하기 위해 정확하고 신속한 거래 시간 단축 거래 비용 절감 (아래의 구현 부족 예 참조) 여러 항목에 대한 동시 자동 점검 시장 조건 거래 배치시 수동 오류 위험 감소 사용 가능한 과거 및 실시간 데이터를 기반으로 알고리즘 백 테 스트 정서적 및 심리적 요인에 기반한 인적 자원 거래자의 실수 가능성 감소.
현재의 고액 거래의 가장 큰 부분은 고주파 거래 (high frequency trading, HFT)입니다. 이 프로그램은 사전 프로그래밍 된 지침에 따라 여러 시장 및 여러 결정 매개 변수에 걸쳐 매우 빠른 속도로 많은 수주를 배치하려고 시도합니다. (고주파 거래에 대한 자세한 내용은 고주파 거래 (HFT) 회사의 전략과 비밀을 참조하십시오.)
Algo-trading은 다음과 같은 다양한 거래 및 투자 활동에 사용됩니다.
주식을 대량 구매하지만 불특정 다수의 투자로 주식 가격에 영향을 미치기를 원하지 않는 중장기 투자자 또는 매수 측면 기업 (연기금, 뮤추얼 펀드, 보험 회사). 단기 거래자 및 매도자 측 참가자 (시장 형성 자, 투기자 및 중개인)는 자동 거래 실행의 혜택을받습니다. 또한, algo-trading은 시장에있는 판매자에게 충분한 유동성을 창출하는 데 도움을줍니다. Systematic traders (trend followers, pairs traders, hedge funds, etc.) find it much more efficient to program their trading rules and let the program trade automatically.
Algorithmic trading provides a more systematic approach to active trading than methods based on a human trader's intuition or instinct.
알고리즘 트레이딩 전략.
Any strategy for algorithmic trading requires an identified opportunity which is profitable in terms of improved earnings or cost reduction. The following are common trading strategies used in algo-trading:
The most common algorithmic trading strategies follow trends in moving averages, channel breakouts, price level movements and related technical indicators. These are the easiest and simplest strategies to implement through algorithmic trading because these strategies do not involve making any predictions or price forecasts. Trades are initiated based on the occurrence of desirable trends, which are easy and straightforward to implement through algorithms without getting into the complexity of predictive analysis. The above mentioned example of 50 and 200 day moving average is a popular trend following strategy. (For more on trend trading strategies, see: Simple Strategies for Capitalizing on Trends .)
Buying a dual listed stock at a lower price in one market and simultaneously selling it at a higher price in another market offers the price differential as risk-free profit or arbitrage. The same operation can be replicated for stocks versus futures instruments, as price differentials do exists from time to time. Implementing an algorithm to identify such price differentials and placing the orders allows profitable opportunities in efficient manner.
Index funds have defined periods of rebalancing to bring their holdings to par with their respective benchmark indices. This creates profitable opportunities for algorithmic traders, who capitalize on expected trades that offer 20-80 basis points profits depending upon the number of stocks in the index fund, just prior to index fund rebalancing. Such trades are initiated via algorithmic trading systems for timely execution and best prices.
A lot of proven mathematical models, like the delta-neutral trading strategy, which allow trading on combination of options and its underlying security, where trades are placed to offset positive and negative deltas so that the portfolio delta is maintained at zero.
Mean reversion strategy is based on the idea that the high and low prices of an asset are a temporary phenomenon that revert to their mean value periodically. Identifying and defining a price range and implementing algorithm based on that allows trades to be placed automatically when price of asset breaks in and out of its defined range.
Volume weighted average price strategy breaks up a large order and releases dynamically determined smaller chunks of the order to the market using stock specific historical volume profiles. The aim is to execute the order close to the Volume Weighted Average Price (VWAP), thereby benefiting on average price.
Time weighted average price strategy breaks up a large order and releases dynamically determined smaller chunks of the order to the market using evenly divided time slots between a start and end time. The aim is to execute the order close to the average price between the start and end times, thereby minimizing market impact.
Until the trade order is fully filled, this algorithm continues sending partial orders, according to the defined participation ratio and according to the volume traded in the markets. The related "steps strategy" sends orders at a user-defined percentage of market volumes and increases or decreases this participation rate when the stock price reaches user-defined levels.
The implementation shortfall strategy aims at minimizing the execution cost of an order by trading off the real-time market, thereby saving on the cost of the order and benefiting from the opportunity cost of delayed execution. The strategy will increase the targeted participation rate when the stock price moves favorably and decrease it when the stock price moves adversely.
There are a few special classes of algorithms that attempt to identify “happenings” on the other side. These "sniffing algorithms," used, for example, by a sell side market maker have the in-built intelligence to identify the existence of any algorithms on the buy side of a large order. Such detection through algorithms will help the market maker identify large order opportunities and enable him to benefit by filling the orders at a higher price. This is sometimes identified as high-tech front-running. (For more on high-frequency trading and fraudulent practices, see: If You Buy Stocks Online, You Are Involved in HFTs .)
Technical Requirements for Algorithmic Trading.
Implementing the algorithm using a computer program is the last part, clubbed with backtesting. The challenge is to transform the identified strategy into an integrated computerized process that has access to a trading account for placing orders. The following are needed:
Computer programming knowledge to program the required trading strategy, hired programmers or pre-made trading software Network connectivity and access to trading platforms for placing the orders Access to market data feeds that will be monitored by the algorithm for opportunities to place orders The ability and infrastructure to backtest the system once built, before it goes live on real markets Available historical data for backtesting, depending upon the complexity of rules implemented in algorithm.
Here is a comprehensive example: Royal Dutch Shell (RDS) is listed on Amsterdam Stock Exchange (AEX) and London Stock Exchange (LSE). Let’s build an algorithm to identify arbitrage opportunities. Here are few interesting observations:
AEX trades in Euros, while LSE trades in Sterling Pounds Due to the one hour time difference, AEX opens an hour earlier than LSE, followed by both exchanges trading simultaneously for next few hours and then trading only in LSE during the last hour as AEX closes.
Can we explore the possibility of arbitrage trading on the Royal Dutch Shell stock listed on these two markets in two different currencies?
A computer program that can read current market prices Price feeds from both LSE and AEX A forex rate feed for GBP-EUR exchange rate Order placing capability which can route the order to the correct exchange Back-testing capability on historical price feeds.
The computer program should perform the following:
Read the incoming price feed of RDS stock from both exchanges Using the available foreign exchange rates, convert the price of one currency to other If there exists a large enough price discrepancy (discounting the brokerage costs) leading to a profitable opportunity, then place the buy order on lower priced exchange and sell order on higher priced exchange If the orders are executed as desired, the arbitrage profit will follow.
Simple and easy! However, the practice of algorithmic trading is not that simple to maintain and execute. Remember, if you can place an algo-generated trade, so can the other market participants. Consequently, prices fluctuate in milli - and even microseconds. In the above example, what happens if your buy trade gets executed, but sell trade doesn’t as the sell prices change by the time your order hits the market? You will end up sitting with an open position, making your arbitrage strategy worthless.
There are additional risks and challenges: for example, system failure risks, network connectivity errors, time-lags between trade orders and execution, and, most important of all, imperfect algorithms. The more complex an algorithm, the more stringent backtesting is needed before it is put into action.
결론.
Quantitative analysis of an algorithm’s performance plays an important role and should be examined critically. It’s exciting to go for automation aided by computers with a notion to make money effortlessly. But one must make sure the system is thoroughly tested and required limits are set. Analytical traders should consider learning programming and building systems on their own, to be confident about implementing the right strategies in foolproof manner. Cautious use and thorough testing of algo-trading can create profitable opportunities. (For more, see How to Code Your Own Algo Trading Robot.)

QuantStart.
Join the Quantcademy private membership portal that caters to the rapidly-growing retail quant trader community . You'll find a knowledgeable, like-minded group of quant traders ready to answer your most pressing quant trading questions.
Check out my ebook on quant trading where I teach you how to build profitable systematic trading strategies with Python tools, from scratch.
Take a look at my new ebook on advanced trading strategies using time series analysis, machine learning and Bayesian statistics, with Python and R .
By Michael Halls-Moore on June 7th, 2013.
Algorithmic trading is usually perceived as a complex area for beginners to get to grips with. It covers a wide range of disciplines, with certain aspects requiring a significant degree of mathematical and statistical maturity. Consequently it can be extremely off-putting for the uninitiated. In reality, the overall concepts are straightforward to grasp, while the details can be learned in an iterative, ongoing manner.
The beauty of algorithmic trading is that there is no need to test out ones knowledge on real capital, as many brokerages provide highly realistic market simulators. While there are certain caveats associated with such systems, they provide an environment to foster a deep level of understanding, with absolutely no capital risk.
A common question that I receive from readers of QuantStart is "How do I get started in quantitative trading?". I have already written a beginner's guide to quantitative trading, but one article cannot hope to cover the diversity of the subject. Thus I've decided to recommend my favourite entry-level quant trading books in this article.
The first task is to gain a solid overview of the subject. I have found it be far easier to avoid heavy mathematical discussions until the basics are covered and understood. The best books I have found for this purpose are as follows:
1) Quantitative Trading by Ernest Chan - This is one of my favourite finance books. Dr. Chan provides a great overview of the process of setting up a "retail" quantitative trading system, using MatLab or Excel. He makes the subject highly approachable and gives the impression that "anyone can do it". Although there are plenty of details that are skipped over (mainly for brevity), the book is a great introduction to how algorithmic trading works. He discusses alpha generation ("the trading model"), risk management, automated execution systems and certain strategies (particularly momentum and mean reversion). This book is the place to start. 2) Inside the Black Box by Rishi K. Narang - In this book Dr. Narang explains in detail how a professional quantitative hedge fund operates. It is pitched at a savvy investor who is considering whether to invest in such a "black box". Despite the seeming irrelevance to a retail trader, the book actually contains a wealth of information on how a "proper" quant trading system should be carried out. For instance, the importance of transaction costs and risk management are outlined, with ideas on where to look for further information. Many retail algo traders could do well to pick this up and see how the 'professionals' carry out their trading. 3) Algorithmic Trading & DMA by Barry Johnson - The phrase 'algorithmic trading', in the financial industry, usually refers to the execution algorithms used by banks and brokers to execute efficient trades. I am using the term to cover not only those aspects of trading, but also quantitative or systematic trading. This book is mainly about the former, being written by Barry Johnson, who is a quantitative software developer at an investment bank. Does this mean it is of no use to the retail quant? Not at all. Possessing a deeper understanding of how exchanges work and "market microstructure" can aid immensely the profitability of retail strategies. Despite it being a heavy tome, it is worth picking up.
Once the basic concepts are grasped, it is necessary to begin developing a trading strategy. This is usually known as the alpha model component of a trading system. Strategies are straightforward to find these days, however the true value comes in determining your own trading parameters via extensive research and backtesting. The following books discuss certain types of trading and execution systems and how to go about implementing them:
4) Algorithmic Trading by Ernest Chan - This is the second book by Dr. Chan. In the first book he eluded to momentum, mean reversion and certain high frequency strategies. This book discusses such strategies in depth and provides significant implementation details, albeit with more mathematical complexity than in the first (e. g. Kalman Filters, Stationarity/Cointegration, CADF etc). The strategies, once again, make extensive use of MatLab but the code can be easily modified to C++, Python/pandas or R for those with programming experience. It also provides updates on the latest market behaviour, as the first book was written a few years back. 5) Trading and Exchanges by Larry Harris - This book concentrates on market microstructure , which I personally feel is an essential area to learn about, even at the beginning stages of quant trading. Market microstructure is the "science" of how market participants interact and the dynamics that occur in the order book . It is closely related to how exchanges function and what actually happens when a trade is placed. This book is less about trading strategies as such, but more about things to be aware of when designing execution systems. Many professionals in the quant finance space regard this as an excellent book and I also highly recommend it.
At this stage, as a retail trader, you will be in a good place to begin researching the other components of a trading system such as the execution mechanism (and its deep relationship with transaction costs), as well as risk and portfolio management. I will dicuss books for these topics in later articles.
Just Getting Started with Quantitative Trading?
3 Reasons to Subscribe to the QuantStart List:
1. Quant Trading Lessons.
You'll get instant access to a free 10-part course packed with hints and tips to help you get started in quantitative trading!
2. All The Latest Content.
Every week I'll send you a wrap of all activity on QuantStart so you'll never miss a post again.
Real, actionable quant trading tips with no nonsense.

Good algorithmic trading strategies


I've noticed that once in a while, people that post algorithms refer to academic papers as sources of inspiration for their algorithm. What's the best way to find academic literature on trading algorithms?
Sorry, something went wrong. Try again or contact us by sending feedback.
You've successfully submitted a support ticket.
Our support team will be in touch soon.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian.
In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian.
In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Comments

Popular posts from this blog

뉴캐슬 대학 시간 전략

Forexpk 채권

세 까마귀의 중요성