Skip to main content

استراتيجيات التداول باستخدام التعلم الآلي العميق


بناء استراتيجيات أفضل! الجزء الرابع: تعلم الآلة.
وكان الأزرق العميق أول كمبيوتر فاز في بطولة العالم الشطرنج. كان ذلك عام 1996، واستغرق الأمر 20 عاما حتى برنامج آخر، ألفاغو، يمكن أن هزيمة أفضل لاعب غو الإنسان. كان الأزرق العميق نظاما يستند إلى نموذج مع قواعد الشطرنج هاردويريد. ألفاغو هو نظام استخراج البيانات، شبكة العصبية العميقة المدربة مع الآلاف من الألعاب الذهاب. لم تتحسن الأجهزة، ولكن انفراجة في البرنامج كان ضروريا لخطوة من الضرب كبار لاعبي الشطرنج لضرب كبار اللاعبين الذهاب.
في هذا الجزء 4 من سلسلة مصغرة نحن & # 8217؛ سوف ننظر في نهج استخراج البيانات لتطوير استراتيجيات التداول. هذا الأسلوب لا يهتم بآليات السوق. انها مجرد مسح منحنيات السعر أو مصادر البيانات الأخرى للنماذج التنبؤية. تعلم الآلة أو & # 8220؛ الذكاء الاصطناعي & # 8221؛ لا تشارك دائما في استراتيجيات استخراج البيانات. في الواقع الأكثر شعبية & # 8211؛ والمربحة بشكل مثير للدهشة & # 8211؛ طريقة استخراج البيانات يعمل دون أي الشبكات العصبية الهوى أو آلات ناقلات الدعم.
مبادئ التعلم الآلي.
يتم تغذية خوارزمية التعلم مع عينات البيانات، وعادة ما تستمد بطريقة ما من الأسعار التاريخية. وتتألف كل عينة من متغيرات n × 1 .. x n، التي يطلق عليها عادة تنبؤات، وميزات، وإشارات، أو ببساطة إدخال. يمكن لهذه التنبؤات أن تكون عائدات السعر من آخر أشرطة n، أو مجموعة من المؤشرات الكلاسيكية، أو أي وظائف أخرى يمكن تخيلها من منحنى السعر (I & # 8217؛ حتى رأيت بكسل من صورة الرسم البياني للسعر المستخدمة كمنبؤات لعصبية شبكة الاتصال!). كل عينة تشمل عادة متغير الهدف y، مثل عودة التجارة التالية بعد أخذ العينة، أو حركة السعر المقبل. في الأدب يمكنك أن تجد ذ اسمه أيضا تسمية أو موضوعية. في عملية التدريب، والخوارزمية يتعلم التنبؤ الهدف ذ من التنبؤات × 1 .. س ن. الذاكرة & # 8216؛ الذاكرة & # 8217؛ يتم تخزينها في بنية بيانات اسمها النموذج الذي هو محدد للخوارزمية (لا ينبغي الخلط بينه وبين نموذج مالي للاستراتيجيات القائمة على نموذج!). يمكن أن يكون نموذج التعلم الآلي وظيفة مع قواعد التنبؤ في رمز C، التي تم إنشاؤها بواسطة عملية التدريب. أو يمكن أن يكون مجموعة من أوزان الاتصال للشبكة العصبية.
يجب على التنبؤات، والميزات، أو ما تسمونه، يجب أن تحمل معلومات كافية للتنبؤ الهدف ذ مع بعض الدقة. كما أنها غالبا ما تفي بمتطلبين رسميين. أولا، يجب أن تكون جميع قيم التنبؤ في نفس النطاق، مثل -1 .. +1 (لمعظم خوارزميات R) أو -100 .. +100 (لخوارزميات زورو أو تسب). لذلك تحتاج إلى تطبيع لهم في بعض الطريق قبل إرسالها إلى الجهاز. ثانيا، يجب أن تكون العينات متوازنة، أي موزعة بالتساوي على جميع قيم المتغير المستهدف. لذلك يجب أن يكون هناك حول العديد من الفوز كما تفقد العينات. إذا لم تلاحظ هذين الشرطين، فإنك تتساءل عن سبب حصولك على نتائج سيئة من خوارزمية تعلم الآلة.
تتوقع خوارزميات الانحدار قيمة رقمية، مثل حجم وعلامة حركة السعر التالية. تتنبأ خوارزميات التصنيف بفئة عينة نوعية، على سبيل المثال، ما إذا كانت النتيجة تسبق الفوز أو الخسارة. بعض الخوارزميات، مثل الشبكات العصبية، أشجار القرار، أو دعم ناقلات الآلات، يمكن تشغيلها في كلا الوضعين.
وهناك عدد قليل من الخوارزميات تعلم تقسيم العينات إلى فئات دون الحاجة إلى أي هدف ذ. هذا التعلم غير الخاضع للرقابة، بدلا من التعلم تحت الإشراف باستخدام الهدف. في مكان ما في المنتصف هو التعلم التعزيز، حيث يقوم النظام بتدريب نفسه عن طريق تشغيل المحاكاة مع ميزات معينة، واستخدام النتيجة كهدف التدريب. ألفازيرو، خليفة ألفاغو، استخدم التعلم التعزيز من خلال اللعب الملايين من ألعاب الذهاب ضد نفسها. في مجال التمويل هناك عدد قليل من التطبيقات للتعلم غير الخاضعة للرقابة أو التعزيز. 99٪ من استراتيجيات التعلم الآلي تستخدم التعلم تحت الإشراف.
أيا كانت الإشارات التي نستخدمها للتنبؤات في التمويل، فإنها على الأرجح تحتوي على الكثير من الضجيج وقليل من المعلومات، وسوف تكون غير مستقرة على رأسها. لذلك التنبؤ المالي هو واحد من أصعب المهام في التعلم الآلي. الخوارزميات الأكثر تعقيدا لا تحقق بالضرورة نتائج أفضل. اختيار التنبؤات أمر بالغ الأهمية للنجاح. ليست فكرة جيدة لاستخدام الكثير من التنبؤات، لأن هذا يسبب ببساطة الإفراط في الفشل والفشل في الخروج من عملية العينة. لذلك استراتيجيات استخراج البيانات غالبا ما تطبق خوارزمية الاختيار الأولي الذي يحدد عدد قليل من التنبؤات من مجموعة من العديد. ويمكن أن يستند الاختيار المسبق إلى العلاقة بين المتنبئات، وعلى الأهمية، وعلى محتوى المعلومات، أو ببساطة على نجاح التنبؤ مع مجموعة اختبار. التجارب العملية مع اختيار ميزة يمكن العثور عليها في مقالة حديثة عن بلوق روبوت الثروة.
هنا & # 8217؛ s قائمة من الأكثر شعبية استخراج البيانات الطرق المستخدمة في التمويل.
1. حساء المؤشر.
معظم النظم التجارية نحن & # 8217؛ إعادة البرمجة للعملاء لا تستند إلى نموذج مالي. العميل يريد فقط إشارات التجارة من بعض المؤشرات الفنية، تصفيتها مع المؤشرات الفنية الأخرى في تركيبة مع المزيد من المؤشرات الفنية. وعندما سئل عن كيف يمكن لهذا الخليط من المؤشرات أن يكون استراتيجية مربحة، أجاب عادة: & # 8220؛ ثق بي. I & # 8217؛ م التداول يدويا، وأنه يعمل. & # 8221؛
لقد فعلت ذلك بالفعل. على الأقل في بعض الأحيان. على الرغم من أن معظم تلك النظم لم يمر اختبار وفا (وبعض حتى لا باكتست بسيط)، وعدد كبير من المستغرب فعلت. وكانت تلك أيضا في كثير من الأحيان مربحة في التداول الحقيقي. وقد أجرى العميل تجربة منهجية للمؤشرات الفنية حتى وجد مزيجا يعمل في التداول المباشر مع أصول معينة. هذه الطريقة من التحليل الفني التجريبي والخطأ هو نهج استخراج البيانات الكلاسيكية، مجرد إعدام من قبل الإنسان وليس من قبل آلة. لا أستطيع حقا أن أوصي هذا الأسلوب & # 8211؛ والكثير من الحظ، لا الكلام عن المال، وربما تشارك & # 8211؛ ولكن يمكنني أن أشهد أنه يؤدي أحيانا إلى أنظمة مربحة.
2. أنماط شمعة.
لا ينبغي الخلط مع تلك أنماط الشموع اليابانية التي كان لها أفضل قبل تاريخ طويل، منذ فترة طويلة. المعادل الحديث هو تداول حركة السعر. أنت & # 8217؛ لا تزال تبحث في مفتوحة، عالية، منخفضة، وإغلاق الشموع. أنت & # 8217؛ لا تزال تأمل في العثور على نمط يتنبأ بإتجاه السعر. ولكن أنت & # 8217؛ الآن استخراج البيانات المعاصرة السعر المنحنيات لجمع تلك الأنماط. وهناك حزم برامج لهذا الغرض. يبحثون عن أنماط مربحة من قبل بعض المعايير المعرفة من قبل المستخدم، واستخدامها لبناء وظيفة كشف نمط معين. يمكن أن يبدو مثل هذا واحد (من زورو & # 8217؛ ق نمط محلل):
ترجع الدالة C 1 عندما تطابق الإشارات أحد الأنماط، وإلا 0. يمكنك أن ترى من الشفرة الطويلة أن هذه ليست أسرع طريقة للكشف عن الأنماط. طريقة أفضل، التي يستخدمها زورو عندما لا يتم تصدير وظيفة الكشف، هو فرز الإشارات من حيث حجمها والتحقق من ترتيب الفرز. ومثال على هذا النظام يمكن العثور عليها هنا.
يمكن سعر التداول العمل حقا العمل؟ تماما مثل حساء المؤشر، فإنه لا يستند إلى أي نموذج مالي عقلاني. يمكن للمرء أن يتصور في أفضل الأحوال أن تسلسل تحركات الأسعار يسبب المشاركين في السوق للرد بطريقة معينة، وبهذه الطريقة إنشاء نمط تنبؤي مؤقت. ومع ذلك فإن عدد من أنماط محدودة جدا عند النظر فقط في تسلسل عدد قليل من الشموع المتجاورة. الخطوة التالية هي مقارنة الشموع التي ليست متاخمة، ولكن يتم اختيارها بشكل تعسفي خلال فترة زمنية أطول. وبهذه الطريقة يمكنك الحصول على عدد غير محدود تقريبا من الأنماط & # 8211؛ ولكن على حساب ترك أخيرا مجال العقلاني. من الصعب أن نتخيل كيف يمكن توقع حركة السعر من قبل بعض أنماط الشموع منذ أسابيع.
ومع ذلك، هناك الكثير من الجهد في ذلك. يدير زميل المدون، دانيال فرنانديز، موقع الاشتراك على الانترنت (أسيريكوي) المتخصصة في استخراج البيانات أنماط شمعة. انه صقل نمط التداول وصولا الى أصغر التفاصيل، وإذا كان أي شخص من أي وقت مضى تحقيق أي ربح بهذه الطريقة، سيكون له. ولكن لمشتركيه & # 8217؛ خيبة أمل، تداول أنماطه الحية (كوريكوانت) أنتج نتائج مختلفة جدا من له باكتيستس رائعة. إذا كانت أنظمة العمل السعر مربحة موجودة حقا، على ما يبدو لا أحد قد وجدت لهم حتى الآن.
3. الانحدار الخطي.
أساس بسيط من العديد من خوارزميات التعلم الآلي المعقدة: التنبؤ المتغير الهدف ذ من قبل مزيج خطي من التنبؤات × 1 .. س ن.
والمعاملات a هي النموذج. يتم حسابها لتقليل مجموع الاختلافات التربيعية بين قيم y الحقيقية من عينات التدريب وتوقعها y من الصيغة أعلاه:
للعينات الموزعة العادية، والتقليل من الممكن مع بعض الحساب المصفوفة، لذلك لا حاجة التكرارات. في الحالة n = 1 & # 8211؛ مع متغير واحد فقط متغير x & # 8211؛ يتم تقليل صيغة الانحدار إلى.
وهو الانحدار الخطي البسيط، بدلا من الانحدار الخطي متعدد المتغيرات حيث n & غ؛ 1 - الانحدار الخطي البسيط متوفر في معظم منصات التداول، f. i. مع مؤشر لينريغ في تا-ليب. مع y = برايس و x = تايم & # 8217؛ s غالبا ما تستخدم كبديل للمتوسط ​​المتحرك. الانحدار الخطي متعدد المتغيرات متاح في منصة R من خلال الدالة (..) التي تأتي مع التثبيت القياسي. البديل هو الانحدار متعدد الحدود. مثل الانحدار البسيط فإنه يستخدم متغير واحد فقط متغير x، ولكن أيضا مربعه ودرجاته العليا، بحيث x n == x n:
مع n = 2 أو n = 3، غالبا ما يستخدم الانحدار متعدد الحدود للتنبؤ بالسعر المتوسط ​​التالي من الأسعار المسطحة للأشرطة الأخيرة. وظيفة بوليفيت من ماتلاب، R، زورو، والعديد من المنصات الأخرى يمكن أن تستخدم لانحدار متعدد الحدود.
4. بيرسيبترون.
غالبا ما يشار إليها باسم الشبكة العصبية مع واحد فقط من الخلايا العصبية. في الواقع بيرسيبترون هو وظيفة الانحدار مثل أعلاه، ولكن مع نتيجة ثنائية، مما يسمى الانحدار اللوجستي. انها & # 8217؛ s لا الانحدار الرغم من ذلك، انها & # 8217؛ s خوارزمية التصنيف. تولد الدالة زورو & # 8217 s (بيرسيبترون، & # 8230؛) شفرة C ترجع إما 100 أو -100، وتعتمد على ما إذا كانت النتيجة المتوقعة أعلى من عتبة أم لا:
يمكنك أن ترى أن صفيف سيغ يعادل الميزات x n في صيغة الانحدار، والعوامل الرقمية هي المعاملات n.
5. الشبكات الإلكترونية N.
الانحدار الخطي أو اللوجستي يمكن أن تحل المشاكل الخطية فقط. العديد من لا تقع في هذه الفئة & # 8211؛ مثال مشهور هو التنبؤ الناتج من وظيفة شور بسيطة. وعلى الأرجح أيضا التنبؤ الأسعار أو عائدات التجارة. يمكن للشبكة العصبية الاصطناعية (أن) معالجة المشاكل غير الخطية. انها مجموعة من بيرسيبترونس التي ترتبط معا في مجموعة من الطبقات. أي بيرسيبترون هو الخلايا العصبية من الشبكة. خرجها يذهب إلى مدخلات جميع الخلايا العصبية من الطبقة التالية، مثل هذا:
وكما هو الحال في المنظور، تتعلم الشبكة العصبية أيضا من خلال تحديد المعاملات التي تقلل من الخطأ بين التنبؤ بالعينة وهدف العينة. ولكن هذا يتطلب الآن عملية تقريب، وعادة مع باكبروباغاتينغ الخطأ من الإخراج إلى المدخلات، وتحسين الأوزان في طريقها. وتفرض هذه العملية قيادتين. أولا، يجب أن تكون مخرجات الخلايا العصبية الآن وظائف مختلفة بشكل مستمر بدلا من عتبة الإدراك الحسي البسيط. ثانيا، يجب ألا تكون الشبكة عميقة جدا & # 8211؛ يجب ألا يحتوي على عدد كبير جدا من & # 8216؛ الطبقات المخفية & # 8217؛ من الخلايا العصبية بين المدخلات والمخرجات. هذا التقييد الثاني يحد من تعقيد المشاكل التي يمكن أن تحلها الشبكة العصبية القياسية.
عند استخدام الشبكة العصبية للتنبؤ بالصفقات، لديك الكثير من المعلمات التي يمكنك اللعب حولها، وإذا كنت & # 8217؛ لا حذرا، تنتج الكثير من التحيز الاختيار:
عدد الطبقات المخفية عدد الخلايا العصبية في طبقة مخفية عدد دورات باكبروباغاتيون، وعناوين اسمه معدل التعلم، وعرض خطوة من عصر الزخم، عامل الجمود للأوزان التكيف وظيفة التنشيط.
وظيفة التنشيط يحاكي عتبة بيرسيبترون. ل باكبروباغاتيون تحتاج إلى وظيفة التفريق بشكل مستمر أن يولد & # 8216؛ لينة & # 8217؛ خطوة على قيمة x معينة. عادة يتم استخدام وظيفة السيني، تانه، أو سوفتماكس. في بعض الأحيان انها أيضا وظيفة خطية التي ترجع فقط المبلغ المرجح لجميع المدخلات. في هذه الحالة يمكن استخدام الشبكة للانحدار، للتنبؤ بقيمة رقمية بدلا من نتيجة ثنائية.
الشبكات العصبية متوفرة في تركيب R القياسية (نيت، شبكة طبقة مخفية واحدة) وفي العديد من الحزم، على سبيل المثال رسنس و FCNN4R.
6. التعلم العميق.
تستخدم طرق التعلم العميق الشبكات العصبية مع العديد من الطبقات الخفية والآلاف من الخلايا العصبية، والتي لا يمكن تدريبها بشكل فعال بعد الآن من قبل باكبروباغاتيون التقليدية. أصبحت عدة طرق شعبية في السنوات الأخيرة لتدريب مثل هذه الشبكات الضخمة. وهم عادة ما قبل تدريب طبقات الخلايا العصبية الخفية لتحقيق عملية التعلم أكثر فعالية. A بولتزمان مقيدة آلة (ربم) هو خوارزمية تصنيف غير خاضعة للرقابة مع بنية شبكة خاصة لا يوجد لديه اتصالات بين الخلايا العصبية الخفية. يستخدم جهاز الاشتعال المتفرق (ساي) بنية الشبكة التقليدية، ولكن قبل القطارات الطبقات المخفية بطريقة ذكية من خلال إعادة إنتاج إشارات الإدخال على مخرجات الطبقة مع عدد قليل من الاتصالات النشطة ممكن. وتتيح هذه الأساليب لشبكات معقدة جدا لمعالجة مهام التعلم المعقدة للغاية. مثل الضرب العالم & # 8217؛ لاعب أفضل الإنسان الذهاب.
شبكات التعلم العميق متوفرة في حزم ديبنيت و دارتش R. يوفر ديبنيت أوتوينكودر، دارتش آلة بولتزمان مقيدة. أنا لم تجرب حتى الآن مع دارتش، ولكن هنا & # 8217؛ s مثال النصي R باستخدام ديبنيت أوتوينكودر مع 3 طبقات مخفية لإشارات التجارة من خلال زورو & # 8217؛ s العصبية () وظيفة:
7. دعم ناقلات الآلات.
مثل شبكة العصبية، آلة ناقلات الدعم (سفم) هو امتداد آخر للانحدار الخطي. عندما ننظر إلى صيغة الانحدار مرة أخرى،
يمكننا تفسير ملامح x ن كإحداثيات مساحة ميزة n - dimensional. تحديد المتغير الهدف y إلى قيمة ثابتة يحدد مستوي في تلك المساحة، يسمى هبربلان لأنه يحتوي على أكثر من اثنين (في الواقع، ن -1) أبعاد. تفصل اللوحة المفرطة العينات مع y & غ؛ o من العينات مع y & لوت؛ 0. ويمكن حساب المعاملات n بطريقة تجعل مسافات الطائرة أقرب العينات & # 8211؛ والتي تسمى & # 8216؛ ناقلات الدعم & # 8217؛ من الطائرة، وبالتالي اسم الخوارزمية & # 8211؛ هو الحد الأقصى. بهذه الطريقة لدينا المصنف ثنائي مع الفصل الأمثل من العينات الفائزة والخاسرة.
المشكلة: عادة لا تكون هذه العينات قابلة للفصل خطيا & # 8211؛ فهي متناثرة حول بشكل غير منتظم في الفضاء ميزة. لا يمكن أن تقلص طائرة مسطحة بين الفائزين والخاسرين. إذا كان يمكن، كان لدينا أساليب أبسط لحساب تلك الطائرة، f. i. التحليل التمييزي الخطي. ولكن بالنسبة للحالة المشتركة نحن بحاجة إلى خدعة سفم: إضافة المزيد من الأبعاد لمساحة الميزة. لهذا الخوارزمية سفم تنتج المزيد من الميزات مع وظيفة النواة التي تجمع بين أي اثنين من التنبؤات الحالية إلى ميزة جديدة. وهذا يشبه الخطوة أعلاه من الانحدار البسيط إلى الانحدار متعدد الحدود، حيث تضيف أيضا المزيد من الميزات عن طريق أخذ المتنبأ الوحيد بالسلطة n. والمزيد من الأبعاد التي تضيفها، وأسهل هو لفصل العينات مع لوحة مسطحة مسطحة. ثم يتم تحويل هذه الطائرة مرة أخرى إلى الفضاء N - الأبعاد الأصلي، والحصول على التجاعيد وتكتل على الطريق. بواسطة ذكي اختيار وظيفة النواة، ويمكن تنفيذ العملية دون حساب الواقع التحول.
مثل الشبكات العصبية، سفمز يمكن استخدامها ليس فقط للتصنيف، ولكن أيضا للانحدار. كما أنها توفر بعض المعلمات لتحسين عملية التنبؤ وربما تحسينها:
وظيفة النواة. كنت عادة استخدام نواة ربف (وظيفة أساس شعاعي، نواة متماثلة)، ولكن لديك أيضا اختيار حبات أخرى، مثل السيني، متعدد الحدود، والخطي. غاما، وعرض نواة ربف معلمة التكلفة C، و & # 8216؛ ركلة جزاء & # 8217؛ للتصنيفات الخاطئة في عينات التدريب.
سفم المستخدمة في كثير من الأحيان هي مكتبة ليبسفم. كما أنها متوفرة في R في حزمة e1071. في الجزء التالي والأخير من هذه السلسلة أخطط لوصف استراتيجية التداول باستخدام هذا سفم.
8. K - أقرب الجيران.
مقارنة مع أن آن الثقيلة و سفم الاشياء، أن & # 8217؛ ق خوارزمية بسيطة لطيفة مع خاصية فريدة من نوعها: فإنه لا يحتاج إلى التدريب. وبالتالي فإن العينات هي النموذج. هل يمكن استخدام هذه الخوارزمية لنظام التداول الذي يتعلم بشكل دائم عن طريق إضافة المزيد والمزيد من العينات ببساطة. وتحسب خوارزمية الجوار الأقرب المسافات في حيز الميزة من قيم الخصائص الحالية إلى العينات الأقرب k. وتحسب المسافة في الفضاء n الأبعاد من مجموعتين من السمات (x 1 .. x n) و (y 1 .. y n) كما هو الحال في بعدين:
وتتوقع الخوارزمية ببساطة الهدف من متوسط ​​المتغيرات المستهدفة k لأقرب العينات، المرجحة بمسافاتها العكسية. ويمكن استخدامه للتصنيف وكذلك الانحدار. يمكن للحيل البرمجيات اقترضت من الرسومات الكمبيوتر، مثل شجرة ثنائية التكيف (عبت)، جعل أقرب جار البحث بسرعة كبيرة. في حياتي الماضية كمبرمج لعبة كمبيوتر، استخدمنا هذه الأساليب في ألعاب لمهام مثل التعلم الذاتي الذكاء العدو. يمكنك استدعاء وظيفة كن في R للتنبؤ أقرب الجار & # 8211؛ أو كتابة وظيفة بسيطة في C لهذا الغرض.
هذه خوارزمية تقريبية للتصنيف غير الخاضع للرقابة. لديها بعض التشابه، وليس فقط اسمها، إلى k - أقرب الجار. لتصنيف العينات، تضع الخوارزمية أولا نقاط عشوائية k في مساحة العنصر. ثم يعين إلى أي من تلك النقاط جميع العينات مع أصغر مسافات إليها. ثم يتم نقل النقطة إلى متوسط ​​هذه العينات الأقرب. وهذا سيولد تخصيص عينات جديدة، لأن بعض العينات هي الآن أقرب إلى نقطة أخرى. وتكرر العملية إلى أن لا يتغير التخصيص بعد الآن بتحريك النقاط، أي أن كل نقطة تكمن بالضبط في متوسط ​​عيناتها الأقرب. لدينا الآن K فئات من العينات، كل في حي واحد من النقاط k.
هذه الخوارزمية بسيطة يمكن أن تنتج نتائج جيدة بشكل مدهش. في R، وظيفة كمينز لا خدعة. مثال على خوارزمية k-مينز لتصنيف أنماط الشموع يمكن العثور عليها هنا: تصنيف الشموع غير الخاضعة للمراقبة من أجل المتعة والربح.
10. نايف بايس.
تستخدم هذه الخوارزمية بايز & # 8217؛ نظرية لتصنيف عينات من الميزات غير الرقمية (أي الأحداث)، مثل أنماط شمعة المذكورة أعلاه. لنفرض أن الحدث X (على سبيل المثال، أن فتح الشريط السابق أقل من فتح الشريط الحالي) يظهر في 80٪ من جميع العينات الفائزة. ما هو احتمالية فوز العينة عندما تحتوي على الحدث X؟ إنه ليس 0.8 كما قد تعتقد. يمكن حساب الاحتمال مع بايز & # 8217؛ نظرية:
P (Y | X) هو احتمال حدوث الحدث Y (f. i الفوز) في جميع العينات التي تحتوي على الحدث X (في مثالنا، أوبين (1) & لوت؛ أوبين (0)). وفقا للصيغة، فإنه يساوي احتمال X يحدث في جميع العينات الفائزة (هنا، 0.8)، مضروبا في احتمال Y في جميع العينات (حوالي 0.5 عندما كنت اتبع نصيحتي أعلاه من عينات متوازنة) وقسمت على احتمال X في جميع العينات.
إذا كنا ساذجة ونفترض أن جميع الأحداث X مستقلة عن بعضها البعض، يمكننا حساب الاحتمال العام أن العينة هو الفوز ببساطة عن طريق ضرب الاحتمالات P (X | الفوز) لكل حدث X. وبهذه الطريقة ننتهي بهذه الصيغة:
مع عامل التحجيم s. لصيغة للعمل، يجب اختيار الميزات بطريقة أنها مستقلة قدر الإمكان، مما يفرض عقبة لاستخدام نايف بايس في التداول. على سبيل المثال، الحدثين إغلاق (1) & لوت؛ كلوز (0) أند أوبين (1) & لوت؛ فتح (0) هي على الأرجح ليست مستقلة عن بعضها البعض. يمكن تحويل التنبؤات العددية إلى الأحداث عن طريق قسمة الرقم إلى نطاقات منفصلة.
خوارزمية نايف بايس هو متاح في حزمة E1071 R في كل مكان.
11 - أشجار القرار والانحدار.
وتتوقع تلك الأشجار نتيجة أو قيمة رقمية استنادا إلى سلسلة من القرارات نعم / لا، في هيكل مثل فروع شجرة. أي قرار هو إما وجود حدث أم لا (في حالة السمات غير العددية) أو مقارنة قيمة ميزة بعتبة ثابتة. تبدو وظيفة شجرة نموذجية، تم إنشاؤها بواسطة أداة إنشاء شجرة زورو & # 8217، كما يلي:
كيف تنتج مثل هذه الشجرة من مجموعة من العينات؟ هناك عدة طرق. يستخدم زورو شانون أنا إنفورماتيون إنتروبي، الذي كان بالفعل ظهور على هذه المدونة في المادة سلخ فروة الرأس. في البداية فإنه يتحقق من واحدة من الميزات، والسماح & # 8217؛ ق يقول × 1. فإنه يضع مفرط مع صيغة الطائرة × 1 = t في مساحة الميزة. تفصل هذه المجموعة الزائدة العينات مع x 1 & غ؛ t من العينات مع x 1 & لوت؛ t. يتم تحديد عتبة تقسيم t بحيث كسب المعلومات & # 8211؛ والفرق من المعلومات الكون من الفضاء كله، لمجموع الكون المعلومات من قسمين المساحات الفرعية & # 8211؛ هو الحد الأقصى. وهذا هو الحال عندما تكون العينات في السطوح الفرعية أكثر تشابها مع بعضها البعض من العينات الموجودة في الحيز كله.
ثم يتم تكرار هذه العملية مع الميزة التالية × 2 واثنين من هيبيربلانس تقسيم اثنين من سوبسباسس. ويعادل كل مقطع مقارنة لمميزة ذات عتبة. عن طريق التقسيم المتكرر، ونحن قريبا الحصول على شجرة ضخمة مع الآلاف من مقارنات العتبة. ثم يتم تشغيل العملية إلى الوراء عن طريق تقليم الشجرة وإزالة جميع القرارات التي لا تؤدي إلى مكاسب كبيرة من المعلومات. وأخيرا نحن في نهاية المطاف مع شجرة صغيرة نسبيا كما هو الحال في التعليمات البرمجية أعلاه.
أشجار القرار لديها مجموعة واسعة من التطبيقات. ويمكن أن تنتج توقعات ممتازة متفوقة على تلك التي من الشبكات العصبية أو آلات ناقلات الدعم. لكنها ليست حل واحد يناسب الجميع، لأن الطائرات تقسيمها هي دائما موازية لمحاور الفضاء ميزة. وهذا يحد من توقعاتهم إلى حد ما. ويمكن استخدامها ليس فقط للتصنيف، ولكن أيضا للتراجع، على سبيل المثال عن طريق إعادة النسبة المئوية للعينات المساهمة في فرع معين من الشجرة. شجرة زورو & # 8217؛ s شجرة الانحدار. خوارزمية شجرة التصنيف الأكثر شهرة هي C5.0، وهي متوفرة في حزمة C50 ل R.
ولتحسين التنبؤ أو تجاوز الحدود الموازية للمحور، يمكن استخدام مجموعة من الأشجار تسمى غابة عشوائية. ثم يتم إنشاء التنبؤ عن طريق المتوسط ​​أو التصويت التنبؤات من الأشجار واحدة. تتوفر الغابات العشوائية في حزم R راندومفوريست، الحارس و ربوريست.
استنتاج.
هناك العديد من البيانات المختلفة وأساليب التعلم الآلي تحت تصرفكم. السؤال الحاسم: ما هو أفضل، على أساس نموذج أو استراتيجية التعلم الآلي؟ ليس هناك شك في أن تعلم الآلة لديها الكثير من المزايا. لا تحتاج إلى الاهتمام بالبنية المجهرية للسوق، أو الاقتصاد، أو علم النفس التاجر، أو الأشياء اللينة المشابهة. يمكنك التركيز على الرياضيات البحتة. التعلم الآلي هو أكثر أناقة، وأكثر جاذبية طريقة لتوليد أنظمة التجارة. لديها كل المزايا على جانبها ولكن واحد. على الرغم من كل المواضيع المتحمسة على المنتديات التاجر، فإنه يميل إلى فشل غامض في التداول المباشر.
كل أسبوع الثاني يتم نشر ورقة جديدة حول التداول مع أساليب التعلم الآلي (ويمكن الاطلاع على عدد قليل أدناه). يرجى أخذ جميع هذه المنشورات مع حبة الملح. ووفقا لبعض الأوراق، حققت معدلات فوز رائعة في حدود 70٪، 80٪، أو حتى 85٪. على الرغم من أن معدل الفوز ليس المعيار الوحيد المناسب & # 8211؛ يمكنك أن تفقد حتى مع ارتفاع معدل الفوز & # 8211؛ 85٪ دقة في التنبؤ الحرف عادة ما يعادل عامل الربح فوق 5. مع مثل هذا النظام العلماء المعنيين يجب أن يكون الملياردير في الوقت نفسه. لسوء الحظ لم أتمكن من إعادة إنتاج معدلات الفوز بهذه الطريقة الموصوفة، ولم تقترب حتى. لذلك ربما الكثير من التحيز الاختيار ذهب إلى النتائج. أو ربما أنا & # 8217؛ م غبي جدا.
وبالمقارنة مع الاستراتيجيات القائمة على نموذج، وأنا & # 8217؛ رأى ليس العديد من أنظمة التعلم الآلي الناجحة حتى الآن. ومن ما يسمعه المرء عن الأساليب الحسابية من خلال صناديق التحوط الناجحة، يبدو أن تعلم الآلة نادرا ما يتم استخدامه. ولكن ربما هذا سوف يتغير في المستقبل مع توافر المزيد من قوة المعالجة والقادم من خوارزميات جديدة للتعلم العميق.
تصنيف باستخدام الشبكات العصبية العميقة: Dixon. et. al.2018 التنبؤ اتجاه السعر باستخدام آن & أمب؛ سفم: Kara. et. al.2018 المقارنة التجريبية لخوارزميات التعلم: Caruana. et. al.2006 التعدين سوق الأوراق المالية ميل باستخدام غا & أمب؛ سفم: Yu. Wang. Lai.2005.
ويتناول الجزء التالي من هذه السلسلة التطوير العملي لاستراتيجية التعلم الآلي.
30 أفكار حول & لدكو؛ بناء استراتيجيات أفضل! الجزء 4: آلة التعلم & رديقو؛
مشاركة لطيفة. هناك الكثير من الإمكانيات في هذه المقاربة نحو السوق.
راجع للشغل هل تستخدم محرر التعليمات البرمجية التي تأتي مع زورو؟ كيف يمكن الحصول على مثل هذا التكوين اللون؟
يتم إنتاج النصي الملونة من قبل وورد. يمكنك تغيير الألوان في محرر زورو، ولكن يمكنك استبدالها مع برامج تحرير أخرى تدعم الألوان الفردية، على سبيل المثال نوتيباد ++.
هل من الممكن بعد ذلك أن المفكرة بالكشف عن المتغيرات زورو في البرامج النصية؟ أعني أن باربيريود هو لاحظ كما هو الحال مع محرر زورو؟
نظريا نعم، ولكن لهذا كان لديك لتكوين تسليط الضوء على بناء المفكرة ++، وأدخل جميع المتغيرات في القائمة. بقدر ما أعرف نوتيباد ++ يمكن أيضا أن لا يتم تكوين لعرض وصف وظيفة في نافذة، كما يفعل محرر زورو. هناك & # 8217؛ s لا أداة مثالية & # 8230؛
توافق على الفقرة الأخيرة. لقد حاولت العديد من تقنيات التعلم الآلي بعد قراءة مختلف & # 8216؛ استعراض الأقران & # 8217؛ أوراق. ولكن إعادة إنتاج نتائجها لا يزال بعيد المنال. عندما أعيش اختبار مع مل يمكنني & # 8217؛ ر يبدو أن يتفوق الإدخال العشوائي.
فشل مل في العيش؟ ربما يجب أن يتم تدريب مل مع بيانات الأسعار التي تشمل أيضا تاريخ الانتشار، لفة، القراد وهلم جرا؟
وأعتقد أن السبب # 1 لفشل الحية هو التحيز استخراج البيانات، والناجمة عن اختيار منحازة المدخلات والمعلمات إلى ألغو.
بفضل المؤلف لسلسلة كبيرة من المقالات.
ومع ذلك، تجدر الإشارة إلى أننا لا نحتاج إلى تضييق وجهة نظرنا مع توقع فقط الخطوة السعر التالية. قد يحدث أن الخطوة التالية تتعارض مع تجارتنا في 70٪ من الحالات ولكن لا يزال يستحق صنع التجارة. يحدث هذا عندما يذهب السعر أخيرا إلى الاتجاه الصحيح ولكن قبل ذلك قد يجعل بعض الخطوات ضدنا. إذا قمنا بتأخير الصفقة بخطوة واحدة فإننا لن نقوم بإدخال 30٪ من الصفقات المذكورة، ولكن لذلك سنزيد من نتيجة بقاء 70٪ خطوة واحدة. لذا فإن المعايير هي القيمة الأعلى: N * average_result أو 0.7 * N * (avergae_result + price_step).
مشاركة لطيفة. إذا كنت ترغب فقط في اللعب حولها مع بعض التعلم الآلي، وأنا نفذت أداة مل بسيطة جدا في الثعبان وأضاف واجهة المستخدم الرسومية. لقد تم تنفيذها للتنبؤ بسلاسل زمنية.
شكرا جسل لقد وجدت مثيرة جدا للاهتمام مقالك. أود أن أسألك من خبرتك في التداول، أين يمكننا تحميل بيانات الفوركس التاريخية الموثوقة؟ وأرى أنه من المهم جدا بسبب حقيقة أن سوق الفوركس هو اللامركزية.
شكرا مقدما!
لا توجد بيانات فوركس موثوق بها حقا، لأن كل وسيط الفوركس يخلق البيانات الخاصة بهم. وتختلف جميعها اعتمادا طفيفا على مقدمي السيولة الذين يستخدمونها. فكسم لديها M1 جيدة نسبيا والبيانات القراد مع عدد قليل من الثغرات. يمكنك تحميل البرنامج مع زورو.
شكرا لكتابة مثل هذه المقالة سلسلة كبيرة جسل & # 8230؛ قراءة ممتعة تماما!
لا بد لي من أن أقول على الرغم من أنني لا & # 8217؛ ر عرض نموذج القائم على واستراتيجيات التعلم الآلي باعتبارها استبعد بعضها بعضا؛ لقد كان بعض النجاح أوس باستخدام مزيج من العناصر التي تصفها.
ولكي تكون أكثر دقة، أبدأ عملية إنشاء النظام من خلال تطوير & # 8216؛ التقليدية & # 8217؛ النموذج الرياضي، ولكن بعد ذلك استخدام مجموعة من خوارزميات التعلم الآلي عبر الإنترنت للتنبؤ بالمصطلحات التالية لمختلف السلاسل الزمنية المختلفة (وليس السعر نفسه) التي يتم استخدامها داخل النموذج. ثم يتم اشتقاق قواعد التداول الفعلية من التفاعلات بين هذه السلاسل الزمنية. لذا، فإنني في الأساس لا أقوم فقط بإلقاء بيانات السوق الأخيرة بشكل أعمق في نموذج مل في محاولة للتنبؤ بالاتجاه نحو السعر، ولكن بدلا من ذلك وضع إطار يستند إلى مبادئ الاستثمار السليمة من أجل توجيه النماذج في الاتجاه الصحيح. ثم البيانات الألغام المعلمات وقياس مستوى التحيز البيانات التعدين كما كنت & # 8217؛ وصف أيضا.
ومن الجدير بالذكر أن I & # 8217؛ لم يكن لدي الكثير من النجاح مع الفوركس.
على أي حال، حظا سعيدا مع التداول الخاص بك ومواكبة المواد العظيمة!
شكرا لنشر هذه السلسلة الصغيرة العظيمة جسل.
قمت مؤخرا بدراسة عدد قليل من أحدث الأوراق حول التداول مل، التعلم العميق خصوصا. ومع ذلك وجدت أن معظمها قيم النتائج دون مؤشر معدل المخاطر، أي أنها تستخدم عادة منحنى روك، ينل لدعم تجربتهم بدلا من نسبة شارب، على سبيل المثال.
أيضا، نادرا ما ذكروا عن تواتر التداول في نتائج التجربة، مما يجعل من الصعب تقييم الربحية المحتملة لتلك الأساليب. لماذا هذا؟ هل لديك أي اقتراحات جيدة للتعامل مع تلك القضايا؟
أوراق مل تهدف عادة لدقة عالية. إن منحنى منحنى األسهم ليس له فائدة. هذا هو نوع من المبرر لأن نوعية التنبؤ مل يحدد الدقة، وليس التباين.
وبطبيعة الحال، إذا كنت ترغب في التجارة حقا مثل هذا النظام، والتباين وسحب العوامل الهامة. ويمكن في الواقع أن يكون النظام ذو الدقة الأقل والتنبؤ الأسوأ أفضل عندما يكون أقل اعتمادا على شروط السوق.
& # 8220؛ في الواقع الأكثر شعبية - ومربحة للدهشة - طريقة استخراج البيانات يعمل دون أي الشبكات العصبية الهوى أو آلات ناقلات الدعم. & # 8221؛
هل يرجى تسمية تلك الأكثر شعبية & أمب؛ والمربحة بشكل مدهش. حتى أتمكن من استخدامها مباشرة.
كنت أشير إلى استراتيجيات حساء المؤشر. لأسباب واضحة لا أستطيع الكشف عن تفاصيل مثل هذه الاستراتيجية، وقد وضعت أبدا مثل هذه النظم نفسي. نحن & # 8217؛ مجرد ترميز لهم. ولكن يمكنني أن أقول أن الخروج مع حساء مؤشر مربحة يتطلب الكثير من العمل والوقت.
حسنا، أنا مجرد بدء المشروع الذي يستخدم إماس بسيطة للتنبؤ الأسعار، فإنه مجرد اختيار إماس الصحيح على أساس الأداء الماضي واختيار الخوارزمية التي تجعل بعض درجة ريفي من الذكاء.
يقدم Jonathan. orrego@gmail خدمات كمبرمج إي MT4.
شكرا على writeup جيد. انها في الواقع تستخدم ليكون حساب الترفيه ذلك.
بدو معقدة لأكثر تواضعا تسليمها من أنت!
بالمناسبة، كيف يمكن أن نكون على اتصال؟
هناك قضايا تالية مع مل ومع أنظمة التداول بشكل عام والتي تقوم على تحليل البيانات التاريخية:
1) البيانات التاريخية لا ترميز المعلومات حول تحركات الأسعار في المستقبل.
حركة الأسعار المستقبلية مستقلة ولا تتعلق بتاريخ الأسعار. هناك على الإطلاق أي نمط موثوق بها والتي يمكن استخدامها لاستخراج بانتظام الأرباح من السوق. تطبيق أساليب مل في هذا المجال هو ببساطة بلا طائل ومحاكم الفشل ولن يعمل إذا كنت تبحث عن نظام مربح. Of course you can curve fit any past period and come up with a profitable system for it.
The only thing which determines price movement is demand and supply and these are often the result of external factors which cannot be predicted. For example: a war breaks out somewhere or other major disaster strikes or someone just needs to buy a large amount of a foreign currency for some business/investment purpose. These sort of events will cause significant shifts in the demand supply structure of the FX market . As a consequence, prices begin to move but nobody really cares about price history just about the execution of the incoming orders. An automated trading system can only be profitable if it monitors a significant portion of the market and takes the supply and demand into account for making a trading decision. But this is not the case with any of the systems being discussed here.
2) Race to the bottom.
Even if (1) wouldn’t be true and there would be valuable information encoded in historical price data, you would still face following problem: there are thousands of gold diggers out there, all of them using similar methods and even the same tools to search for profitable systems and analyze the same historical price data. As a result, many of them will discover the same or very similar “profitable” trading systems and when they begin actually trading those systems, they will become less and less profitable due to the nature of the market.
The only sure winners in this scenario will be the technology and tool vendors.
I will be still keeping an eye on your posts as I like your approach and the scientific vigor you apply. Your blog is the best of its kind – keep the good work!
One hint: there are profitable automated systems, but they are not based on historical price data but on proprietary knowledge about the market structure and operations of the major institutions which control these markets. Let’s say there are many inefficiencies in the current system but you absolutely have no chance to find the information about those by analyzing historical price data. Instead you have to know when and how the institutions will execute market moving orders and front run them.
Thanks for the extensive comment. I often hear these arguments and they sound indeed intuitive, only problem is that they are easily proven wrong. The scientific way is experiment, not intuition. Simple tests show that past and future prices are often correlated – otherwise every second experiment on this blog had a very different outcome. Many successful funds, for instance Jim Simon’s Renaissance fund, are mainly based on algorithmic prediction.
One more thing: in my comment I have been implicitly referring to the buy side (hedge funds, traders etc) not to the sell side (market makers, banks). The second one has always the edge because they sell at the ask and buy at the bid, pocketing the spread as an additional profit to any strategy they might be running. Regarding Jim Simon’s Renaissance: I am not so sure if they have not transitioned over the time to the sell side in order to stay profitable. There is absolutely no information available about the nature of their business besides the vague statement that they are using solely quantitative algorithmic trading models…
Thanks for the informative post!
Regarding the use of some of these algorithms, a common complaint which is cited is that financial data is non-stationary…Do you find this to be a problem? Couldn’t one just use returns data instead which is (I think) stationary?
Yes, this is a problem for sure. If financial data were stationary, we’d all be rich. I’m afraid we have to live with what it is. Returns are not any more stationary than other financial data.
مرحبا يا سيدي، وضعت بعض مجموعة من القواعد لتداول بلدي الذي يحدد مناطق الطلب العرض من حجم وجميع المعايير الأخرى. Can you help me to make it into automated system ?? If i am gonna do that myself then it can take too much time. Please contact me at svadukia@gmail if you are interested.
Sure, please contact my employer at info@opgroup. de. They’ll help.
I have noticed you don’t monetize your page, don’t waste your traffic,
you can earn extra bucks every month because you’ve got high quality content.
If you want to know how to make extra $$$, search for: Mrdalekjd methods for $$$
Technical analysis has always been rejected and looked down upon by quants, academics, or anyone who has been trained by traditional finance theories. I have worked for proprietary trading desk of a first tier bank for a good part of my career, and surrounded by those ivy-league elites with background in finance, math, or financial engineering. I must admit none of those guys knew how to trade directions. They were good at market making, product structures, index arb, but almost none can making money trading directions. لماذا ا؟ Because none of these guys believed in technical analysis. Then again, if you are already making your millions why bother taking the risk of trading direction with your own money. For me luckily my years of training in technical analysis allowed me to really retire after laying off from the great recession. I look only at EMA, slow stochastics, and MACD; and I have made money every year since started in 2009. Technical analysis works, you just have to know how to use it!!

Machine Learning for Trading.
Artificial Intelligence (AI) and Machine Learning (ML) are quietly revolutionizing nearly all areas of our lives. Did you know the latest trading algorithms are using these technologies extensively?
You might be surprised to learn that Machine Learning hedge funds already significantly outperform generalized hedge funds, as well as traditional quant funds, according to a report by ValueWalk. ML and AI systems can be incredibly helpful tools for humans navigating the decision-making process involved with investments and risk assessment.
The impact of human emotions on trading decisions is often the greatest hindrance to outperformance. Algorithms and computers make decisions and execute trades faster than any human can, and do so free from the influence of emotions.
There are numerous different types of algorithmic trading. A few examples are as follows:
Trade execution algorithms, which break up trades into smaller orders to minimize the impact on the stock price. An example of this is a Volume Weighted Average Price (VWAP) strategy Strategy implementation algorithms which make trades based on signals from real-time market data. Examples of this are trend-based strategies that involve moving averages, channel breakouts, price level movements and other technical indicators. Stealth/gaming algorithms that are geared towards detecting and taking advantage of price movements caused by large trades and/or other algorithm strategies. فرص المراجحة. An example would be where a stock may trade on two separate markets for two different prices and the difference in price can be captured by selling the higher-priced stock and buying the lower priced stock.
When algorithmic trading strategies were first introduced, they were wildly profitable and swiftly gained market share. In May 2017, capital market research firm Tabb Group said that high-frequency trading (HFT) accounted for 52% of average daily trading volume. But as competition has increased, profits have declined. In this increasingly difficult environment, traders need a new tool to give them a competitive advantage and increase profits. The good news is that tool is here now: Machine Learning.
Machine learning involves feeding an algorithm data samples, usually derived from historical prices. The data samples consist of variables called predictors, as well as a target variable, which is the expected outcome. The algorithm learns to use the predictor variables to predict the target variable.
Machine learning offers the number of important advantages over traditional algorithmic programs. The process can accelerate the search for effective algorithmic trading strategies by automating what is often a tedious, manual process. It also increases the number of markets an individual can monitor and respond to. Most importantly, they offer the ability to move from finding associations based on historical data to identifying and adapting to trends as they develop. If you can automate a process others are performing manually; you have a competitive advantage. If you can increase the number of markets you’re in, you have more opportunities. And in the zero-sum world of trading, if you can adapt to changes in real time while others are standing still, your advantage will translate into profits.
There are multiple strategies which use machine learning to optimize algorithms, including: linear regressions, neural networks, deep learning, support vector machines, and naive Bayes, to name a few. And well-known funds such as Citadel, Renaissance Technologies, Bridgewater Associates and Two Sigma Investments are pursuing machine learning strategies as part of their investment approach. At Sigmoidal, we have the experience and know-how to help traders incorporate ML into their own trading strategies.
Our case study.
In one of our projects, we designed an intelligent asset allocation system that utilized Deep Learning and Modern Portfolio Theory. The task was to implement an investment strategy that could adapt to rapid changes in the market environment.
The base AI model was responsible for predicting asset returns based on historical data. This was accomplished by implementing Long Short-Term Memory Units, which are a sophisticated generalization of a Recurrent Neural Network. This particular architecture can store information for multiple timesteps, which is made possible by a Memory Cell. This property enables the model to learn long and complicated temporal patterns in data. As a result, we were able to predict the asset’s future returns, as well as the uncertainty of our estimates using a novel technique called Variational Dropout.
In order to strengthen our predictions, we used a wealth of market data, such as currencies, indices, etc. in our model, in addition to the historical returns of relevant assets. This resulted in over 400 features we used to make final predictions. Of course, many of these features were correlated. This problem was mitigated by Principal Component Analysis (PCA), which reduces the dimensionality of the problem and decorrelates features.
We then used the predictions of return and risk (uncertainty) for all the assets as inputs to a Mean-Variance Optimization algorithm, which uses a quadratic solver to minimise risk for a given return. This method determines the allocation of assets, which is diverse and ensures the lowest possible level of risk, given the returns' predictions.
Combining these models created an investment strategy which generated an 8% annualized return, which was 23% higher than any other benchmark strategy tested over a two year period. اتصل بنا لمعرفة المزيد.
AI Strategies Outperform.
It is difficult to find performance data for AI strategies given their proprietary nature, but hedge fund research firm Eurekahedge has published some informative data. The chart below displays the performance of the Eurekahedge AI/Machine Learning Hedge Fund Index vs. traditional quant and hedge funds from 2018 to 2018. The Index tracks 23 funds in total, of which 12 continue to be live.
Eurekahedge notes that:
“AI/machine learning hedge funds have outperformed both traditional quants and the average hedge fund since 2018, delivering annualized returns of 8.44% over this period compared with 2.62%, 1.62% and 4.27% for CTA’s, trend-followers and the average global hedge fund respectively.”
Eurekahedge also provides the following table with the key takeaways:
Table 1: Performance in numbers – AI/Machine Learning Hedge Fund Index vs. quants and traditional hedge funds.
AI/machine learning hedge funds have outperformed the average global hedge fund for all years excluding 2018.
Barring 2018 and 2017, returns for AI/machine learning hedge funds have outpaced those for traditional CTA/managed futures strategies while underperforming systematic trend following strategies only for the year 2017 when the latter realized strong gains from short energy futures.
Over both the five, three and two year annualized period, AI/machine learning hedge funds have outperformed both traditional quants and the average global hedge fund delivering annualized gains of 7.35%, 9.57%, and 10.56% respectively over these periods.
AI/machine learning hedge funds have also posted better risk-adjusted returns over the last two and three year annualized periods compared to all peers depicted in the table below, with Sharpe ratios of 1.51 and 1.53 over both periods respectively.
While returns have been more volatile compared to the average hedge fund (compare with Eurekahedge Hedge Fund Index ), AI/machine learning funds have posted considerably lower annualized volatilities compared with systematic trend following strategies.
Eurekahedge also notes that the AI/machine learning hedge funds are “negatively correlated to the average hedge fund (-0.267)” and have “zero-to-marginally positive correlation to CTA/managed futures and trend following strategies,” which point to the potential diversification benefits of an AI strategy.
The above data illustrate the potential in utilizing AI and Machine Learning in trading strategies. Fortunately, traders are still in the early stages of incorporating this powerful tool into their trading strategies, which means the opportunity remains relatively untapped and the potential significant.
Here is an example of an AI application in practice.
Arizona Financial Text system (AZFinText)
Imagine a system that can monitor stock prices in real time and predict stock price movements based on the news stream. That’s precisely what AZFinText does. This article recounts an experiment that used Support Vector Machine (SVM) to trade S&P-500 and yielded excellent results. Below is the table that shows how it performed relative to the top 10 quantitative mutual funds in the world:
Strategy using Google Trends.
Another experimental trading strategy used Google Trends as a variable. There are a plethora of articles on the use of Google Trends as a sentiment indicator of a market.
The experiment in this paper tracked changes in the search volume of a set of 98 search terms (some of them related to the stock market). The term "debt" turned out to be the strongest, most reliable indicator awhen predicting price movements in the DJIA.
Below is a cumulative performance chart. The red line depicts a "buy and hold" إستراتيجية. Google Trends strategy (blue line) massively outperformed with a return of 326%.
Can I learn ML myself?
Applying Machine Learning to trading is a vast and complicated topis that takes the time to master. But if you're interested, as a starting point we recommend:
Once you're familiar with these materials, there is alo a popular Udacity course on hot to apply the basis of Machine Learning to market trading.
If you want to speed the learning process up, you can hire a consultant. Do make sure to ask tough questions before starting a project .
Or, you can schedule a short call with us to explore what can be done.
I need more specific examples applicable in my industry.
By incorporating Machine Learning into your trading strategies, your portfolio can capture more alpha. But implementing a successful ML investment strategy is difficult – you will need extraordinary, talented people with experience in trading and data science to get you there. Let us help get you started.
Looking for Machine Learning consulting?
شارك هذا المنشور.
Get fresh insights on getting the data to work!
Subscribe to Sigmoidal updates.
My Experience with Docker Swarm - How to know when you might need it.
In this post I'm going to analyze the role of Docker in each stage of the application lifecycle and…
Deep Learning for Computer Vision - going beyond image classification and regression.
Since 2018 when AlexNet appeared and broke almost all the records in image classification contests, the landscape of a…

Trading strategies using deep machine learning


Thomas Wiecki mentioned this a couple of years ago (he omitted the spaces, so look for "ApplyingdeepLearningtoEnhanceMomentumTradingStrategiesinStocks) in the thread on trading ideas.
Takeuchi, L., Lee, Y. (2018). Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks .
We use an autoencoder composed of stacked restricted Boltzmann machines to extract features from the history of individual stock prices. Our model is able to discover an enhanced version of the momentum effect in stocks without extensive hand-engineering of input features and deliver an annualized return of 45.93% over the 1990-2009 test period versus 10.53% for basic momentum.
Can anyone with a data science head create a Q version of this?
Utterly fascinating. Quite impossible for me to comment at this stage but there are a great number of questions I have to which I will need to search for answers. For me the most interesting sentence is as follows:
our model is not merely rediscovering.
known patterns in stock prices, but going beyond what.
humans have been able to achieve.
Is it REALLY possible for deep learning to take a simple set of returns and improve on the "forecasts" made by the application of a simple momentum strategy? This papers seems to indicate that that is the case.
Having read the paper two or three times I am still unclear exactly what each "stack" actually does but no doubt I will eventually tumble upon some sort of conclusion.
Happily, this paper comes at a time when I had decided to retire from the incredibly boring research I have done to date. I have decided to "learn" AI and deep learning. Or at least to attempt to.
I am far from certain that it has any application to the long term prediction of stock prices but this article seems to suggest otherwise. I look forward to finding out whether this research has indeed discovered Eldorado or whether other factors are in play which will make this line of research as fruitless as most others in the financial markets.
Training a deep neural net on quantopian data would be challenging unless you could run the notebooks / algorithms on machines with powerful GPUs attached.
If you have offline access to relevant trading data, you could train a net from that on non-quantopian machines and then translate the resulting net to scipy for execution in the quantopian framework.
Very interesting to read some of the other papers from Stanford on deep learning applied to markets. The referenced paper claims just over a 50% classification accuracy as to whether trades will end up winners or losers the following month. Just using price as the input.
The model is correct 53.84% of the time when it predicts class 1 and a.
somewhat lower 53.01% of the time when it predicts class 2.
Consider that a typical un-adorned old fashioned trend following strategy typically provides 40% winning trades and profits by running winners and cutting losers.
If it did work in 2018 would it work any more? I would think banks and brokerage houses would have armies of PhDs writing code like that.
Many people think that way. And I know what you mean. But if it is true then you may as well give up altogether. As may Quantopian. I have no idea whether it still works but I intend to replicate the study. All I am sure of is my own ignorance.
There was a thread a while back where some one tried this using one of machine learning libraries on a single stock:
Predicting Price Movements via Regimes and Machine Learning.
It may be a good place to start.
It runs quite slow. To speed things up you may want to download price data from EOData (or other site) and work from that on your own machine.
Anthony, I found this Python machine learning code (and associated MOOC course) and thought you might find it useful: johnwittenauer/machine-learning-exercises-in-python-part-1/
Another group has posted even better accuracy numbers (82% vs 53%). Not sure on the quality though.
You probably could just reach out to the authors about their implementation.
RBMs can be done in R with deepnet.
Interesting. The methodology in the Springer link is also based on price only as the input, although perhaps one should not be surprised by the vastly greater accuracy: this is forecasting 1 minute ahead whereas the Lee project forecasts one month ahead.
I'm concentrating on Python, Keras and Theano. as well as skLearn.
Is the paper freely available somewhere?
@Anthony - Yeah, some differences implementation. Python can make calls to R if need. Tried using PDNN for python?
My current knowledge is infantile. I'm beginning from scratch on the whole topic and building ANNs from scratch for the experience using some Noddy textbooks. I'm interested in the whole field so looking at whatever ML techniques could be useful including RBMs.
My suspicion is that so far as longer term investment is concerned this will all turn out to be a waste of time. Or rather that it will not provide me with risk adjusted returns better than the simple 50/50 system I outlined on my website.
But we will see. I am as keen to shoot the lights out as anyone else but know from experience that these ventures usually turn out rather differently than one might have hoped!
When I am a bit further down the line I will contact Takeutchi Lee and see what he did further (if anything) with the strategy outlined. I wonder if he actually traded it? Either for himself or his employers.
@Patrick: Thank you.
Gosh, I just noticed this in the referenced paper:
The data used for training and testing are the AAPL tick-by-tick transactions.
from September to November of 2008.
1 stock tested for 3 months! I'm surprised they did not take it a bit further than that but who knows perhaps the resulst would have been the same for different stocks and periods?
Hi Anthony and group. Two issues:
How many trials were involved in achieving this outperformance? It is not clear. Did they adjust parameters of the RBM until they got the desired result? Besides look-ahead bias which they claim not to be an issue, there is also data-snooping and selection bias. In fact, selection bias can be quite large.
The paper was published at the end of 2018 but the test sample sample ended in 2009. There is no reason for that except in the case that the outperformance came from short-selling during the 2000 and 2008 bear markets, in which case it vanished after 2009.
Claims of outperformance of momentum by Glabadanidis were recently debunked by Prof. Zakamulin after he showed there was look-ahead bias in calculations. More about this and other issues, also regarding special market conditions that give rise to high t-stats, in my recent paper, papers. ssrn/sol3/papers. cfm? abstract_id=2810170.
Has anyone examined the technique proposed by Lee et al.? I'm having a go (using free Quandl data) but I'm finding it difficult to follow. I can handle the ML aspects. But I'm not quite sure how they are packaging the data.
I think it's something like this:
For a given moment in time for a particular stock we can construct a (labelled) training item by using the previous 13 months worth (and the subsequent 1 months worth) of daily data for that stock.
We use this data to construct 12 monthly cumulative returns ending a month short of our moment. So I'm guessing just add up daily Adj_Close prices & spit out the value every 30 or so passes. Now it gets interesting. They do the same thing for every other stock at this moment, and get a z-value for our stock over this set (i. e. # of standard deviations from the mean). So the movement of this z-value is showing the growth of this particular stock relative to the whole market. Since the algorithm is going to be invested a certain amount of money in the market, and just shifting it between stocks, this is what you want!
Looks like they do this for each of the 12 monthly cumrets.
And then they do the same process for the previous 30 days.
That actually makes a lot of sense because you want to be feeding in Data with mean 0 round about the (-1, +1) range into your NN.
So that covers input data. (there is one extra input that is a 'start of year' flag. But a complete supervisor training item also requires an associated output value. It looks as though they are just using whether that particular stock went up in the ensuing month. Although I don't understand their language, they talk about 'above the median'. And median of what. It seems a really weird way of doing it. Why not just look at whether the price one month later is higher or lower than the price at this particular moment & output 1 or 0 accordingly? I think that's what I will do as I don't understand what they're saying.
Then I can only assume that everything is shunted forwards by a single day at the algorithm is repeated to generate another sample.
It seems strange to me that they don't make use of daily volume.
I actually had a go at implementing it on my local machine in TensorFlow using yahoo data I downloaded. "Above the median" just means "above the median of percentage returns for every stock for that month". Just looking at whether the price were higher or lower in absolute terms for the month (rather than whether it were higher or lower relative to all other stock movements) would probably be less effective. They're consistent in using this relative approach, as all return data features are z-scored for each month time-step.
I've backtested in zipline, and so far I've not been able to duplicate their stellar results, but I'm still hopeful as currently my code doesn't use an RBM-based auto-encoder (I'll re-code this part when I get time) and I'm also not training either the auto-encoder or full network for very many cycles on my single-GPU machine. Also I think I could add historical data for now-defunct stocks (rather than just currently tradable ones that I'm using as my "universe") that would get better feature-extraction results in the auto-encoder phase. It wasn't clear to me whether they did this or not. Of course, this old historical data would have to come from another source (not free yahoo data). They're training with data from 1965-1989, which just isn't a lot of data for a deep neural net (and probably way to old for the resultant model to have any practical value for the trading in the present).
By the way, these guys seemed to be able to reproduce the white-paper results with the same input features and a slightly different machine learning model: math. kth. se/matstat/seminarier/reports/M-exjobb15/150612a. pdf.
So roughly 53℅ correct prediction on the test? In 53℅ of cases the network predicted stocks which ended up in the top half of returns in the following period? So very similar .
No backtest provided but. as I say much better than many long term TF systems.
Yeah, supposedly 52.89% in the paper I referenced, though I'm not getting these results in my own code (yet). Yeah it's too bad there's no backtest data provided. This algorithm is definitely long-term, low frequency (you run it once per month, and hold your positions for the entire month) though it could certainly be modified to be shorter term. I intend to play around with it using minute data too, eventually and different trade frequencies on the monthly/daily data.
The Takeichi paper didn't mention vol and drawdown either. Likely to be pretty high I imagine. Also all sorts of other problems like a bias depending on the reallocation date and god knows what else. But interesting stuff. Personally a month holding period would not worry me if the return was really that good. But, to be honest, after years of fooling myself I am pretty jaundiced about backtesting whatever system is used.
In my humble experience annualized returns above 15% are either due to look-ahead bias or over-fitting. The market does not allow these high returns because a leveraged trader would own it longer-term. So these academic researchers are being fooled by backtesting and its most serious caveat which is the "no impact" on prices.
If you take a look at my Aug 124 post above, there is a mention of the papers by Glabadanidis on price series momentum that were declared seminal with returns in the order of 15% only to be refuted recently by Zakamulin for being the result of look-ahead bias. We are talking about simple algos here, yet the implemented code in excel has look-ahead bias. Imagine what can go wrong with complicated ML algos in that domain. I use the geometric equity curve test. If it holds, then the probability of a flaw in backtest is > 95%.
@Michael Harris, you may be right, and thanks for trying to save me from myself and the impractical academics, but I decided I'd be happy reproducing these returns even if flawed. At that point if they seemed too-good-to-be-true, I'd try to pick them apart to find bias/snooping/over-fitting. The main point for me was really an exercise in learning TensorFlow and applying deep learning techniques to financial time-series data. I do believe there are patterns to be teased out of this kind of data using the deep learning approach, though maybe the momentum-based model that this particular ML algorithm produces isn't ultimately going to be profitable. The great thing about deep neural networks is that once you have the basic data flow down and have the network structure declared it's easy to feed it different data that you think might be predictive and produce a model with completely different behavior. It's also relatively easy to modify the network structure, and very easy to tweak params to see if they yield better test results, though as you mentioned, if done improperly I understand there is risk of over-fitting. I still have a lot to learn about the gotchas, so thanks for the words of warning.
@Justin Weeks, maybe you misunderstood me, I did not comment on your work and efforts but on academic papers with results that cannot be replicated and even contain serious errors, assumption and demonstrate lack of understanding of markets and trading.
If you pay close attention to the results of that paper, the following issues are present:
Repeated trials until the authors get a good result. This introduces data-snooping bias. They do not adjust their t-stat for that which shows lack of understanding of the perils of data-mining.
Bulk of gains are between 1990 and 2001, probably a long over-fit during the strongest uptrend in stock market history and than a short over-fit during the dot com crash.
Authors do not report important metrics, such as max drawdown, Sharpe ratio and payoff ratio.
Unfortunately, the academic environment knows how to trick company executives with promises of high returns and authors of similar papers get high paying positions and before they are fired they accumulate good wealth at the expense of honest analysts who will never report unrealistic annual return figures and will apply a reality check to reduce data-mining bias. These honest people have no impressive results to show but only reality and they will never pass thought the door of a large investment bank or hedge fund.
The whole paper was a demonstration of how one can use ML to over-fit data and generate unrealistic returns while obscuring the facts.
Oh god, you really should listen to Michael. He is so damn right. I'm sitting here penning another book - my foolish publishers came back for more. I wanted to have an entire first section on what NOT to do and had written quite a few chapters on the foolishness of relying on back testing in probabilistic trading.
The publishers askme me not to: readers only want to hear what DOES work apparently.
I am actually convinced that ML is a suitable tool for trend following but have absolutely no doubt that a 45% annual return is a fool's quest. Contrary to Michael I do believe in trends (in stocks at least) although even there I have been tricked and mislead in the past by over fitting.
After 30 years in the markets, 15 of those spent largely on systematic trading in one way or another, I deeply cynical. The hedge fund world mostly makes money for the fund managers who walk off with huge fees after their funds collapse. They then start another.
It seems we have two sides to the argument: machine learning experts that know little of real-world trading, and real-world traders lacking expertise in machine learning.
I've got addicted to ML. If I can develop profitable trading algorithms, great! If not, nevermind, there are plenty of decent looking fallback options.
I don't see any suggestion of intellectual dishonesty in that Lee paper, however I do agree it is annoying that papers are allowed to publish results without supporting code.
If anyone is interested in chatting ML, do pop into ##machinelearning on IRC Freenode.
Justin -- thanks for that reply, and the link!
PS I looked through the paper Patrick linked (link. springer/chapter/10.1007/978-3-319-42297-8_40), it look very sketchy. However the original paper appears robust as far as I can see. I will continue to attempt to replicate it.
"machine learning experts that know little of real-world trading, and real-world traders lacking expertise in machine learning."
This alludes to a false dichotomy. Real world trading can be accomplished via a variety of methods including ML. Lacking ML experience may not be a disadvantage in many cases as it can save many exercises in futility.
"I don't see any suggestion of intellectual dishonesty in that Lee paper"
Someone would expect university researchers to be familiar with data-mining and data-snooping bias. The paper was about p-hacking with ML. This is disturbing for an academic paper. The exact number of trials to get to final result should have been reported. But this does not equate to intellectual dishonesty but to naive application of ML.
Good point about code but I suspect that even if you had the exact code you would still not being able to replicate the results due to stochasticity.
you would still not being able to replicate the results due to stochasticity.
You ought to be able to get close. In deep learning it seems random numbers are usually only used for generation of the initial weights. although I am one of those with much experience in markets and little in ML!
These are error rates from five successive runs of a Multilayer perceptron with exact same parameters on the exact same data from a project I am working for a client.
Yes but I wonder how those differences translate into CAGR in a trading system? I wonder whether it makes so much difference that some runs predict say 51℅ of stocks correctly each month or 52.4℅? Know the vagaries of back testing I suspect not?
ML is just fitting a non-linear equation with 10s' to 1000's of undetermined coefficients to data.
It seems like it would be impossible to avoid overfitting. In an upward or downward trending market, I suspect the ML algorithms.
would just learn momentum rules.
If ML is going to work I think you will need to apply it to multiple stocks at once, throw in fundamental data, economic factors etc.
Then perhaps it can discover a pattern in a set of data too big for a human to look at.
The human brain is really good at recognizing patterns. If there were a pattern in the price history of a single stock.
I think you would see it.
Just observing that a key part of the Takeuchi/Lee paper is to "stationarize" the data by turning it into a cross-sectional format.
"we compute a series of 12 cumulative returns using the monthly returns and 20 cumulative returns.
using the the daily returns. We note that price momentum.
is a cross-sectional phenomenon with winners.
having high past returns and losers having low past returns.
relative to other stocks. Thus we normalize each.
of the cumulative returns by calculating the z-score relative.
to the cross-section of all stocks for each month.
If the statistics isn't stationary, the model will not converge or if it manages to converge (mathematically) it's not going to be very useful.
@David, I think they just kept on trying things until they got an impressive result. This is the definition of data-mining bias mainly driven by data-snooping. Nowhere in their paper there is a reference to data-mining bias.
@Michael, data snooping is definitely a possibility. However, the set-up seems quite plausible for fairly good results.. maybe not 50% returns but maybe up to 20% in a "normal" year. I know you spoke of 15% but I am optimistic perhaps naively.
Normal year: the paper didn't talk about more interesting things such as (macro) regime switching that might affect the test results. For instance momentum behaviour can be wildly different in the last quarter of 2008 vs. second through fourth quarter of 2009. If your test covers or misses 2008, it could change results.
A likely place data-snooping gets into the set-up (unless the authors actually kept trying with different setup) is the hold-out cross validation portion. In my experience this is where "leakage" can inadvertently be introduced into the system. By leakage I mean a leakage of future data. The authors never provided the details on the hold-out x-val but if they were not careful with how they created the test set or sets for the hold-out cross-validation, they probably committed the same mistakes in training the finished product.
Here's a Kaggle page on leakage:
From another platform's CEO:
[Many of those algorithms were developed by students using sophisticated machine learning methods like neural networks. “I’m impressed by the quality and stability of the trading algorithms". ]
Deep learning appears very important to stay competitive.
"If you have offline access to relevant trading data, you could train a net from that on non-quantopian machines and then translate the resulting net to scipy for execution in the quantopian framework."
Is it that, I could execute in the quantopian framework but would be unable to join the contest? I have the relevant data. I am looking for ways to get some paper trade track record. I could use Interactive Brokers' paper trading but it is costly to have many IB accounts.
Greg - thanks for the info.
"It runs quite slow. To speed things up you may want to download price data from EOData (or other site) and work from that on your own machine."
After working with outside data and own machine, is there any short cut to change back the codes to upload back smoothly to quantopian?
"[Many of those algorithms were developed by students using sophisticated machine learning methods like neural networks. “I’m impressed by the quality and stability of the trading algorithms". ] ومثل.
But the assumption is that he does not know the algorithms. or am I missing something.
Maybe the next market regime change will sort things out.
[deleted - see below post from Antony]
"Next market regime change", you mean, when some platforms cannot survive? Very interesting anyway.
I mean when market dynamics change, all the over-fitted ML systems will fail.
More information about the significance problem can be found in my paper: papers. ssrn/sol3/papers. cfm? abstract_id=2810170.
For now the impact of these competitions is small. Market regime changes are driven by structural changes (algo trading in the late 1990s, decimalization, then HFT, etc.). In my opinion ensemble results are random priceactionlab/Blog/2018/09/data-science/
There is no way of distinguishing a low log loss due to multiple trials from a statistical significant one. These competitions are doomed in my opinion as more entrants mean further convergences of the sample mean to 0 true mean. Plus they have short-term risk of ruin which is uncontrollable, although small. The key to profits is identifying one or two robust features for the current regime and use those in simple algo. All else translates to more bias, more noise, more risk.
I think this thread has drifted off topic. If that is the case, could those responsible please create new threads & migrate accordingly? I would like to remain subscribed to this thread but only receive email notifications that pertain to the original subject.
I can implimentation that, working on Indian market, my interest is more on minute or five minute data. Also there can be far better use of deepnet if you combine this along with self learned patterns.
Anybody has experience on how to put the trained network into production? To be more specific, how to save the trained model and use it in the real time trading environment. شكر.
Just doing that with my own machine learning algos on the VIX futures contracts. I will report back when done. But I won't be using it on Q or drafting it in Q since I use daily prices, futures contracts and a different python back testing engine.
I've been looking to back-test this since a long time. Finally, I took a stab at it. Here are my results (and settings):
Total no. of tickers: 2,585.
Exchange: NYSE and NASDAQ.
Date range: 2018-02-21 to 2018-11-29.
Business days: 1,203.
Train data: From start until 2018-12-31.
Test data: From 2018-01-01 to end.
Neural Network (Encoder-decoder)
• Architecture o (#nodes in each hidden layers): (33 i/p)-40-4-40-(33 o/p)
o Activation function for hidden layers: ReLu.
o Activation function for output: Linear.
• Optimization o batch_size=100,000.
o Optimizer: Adam (learning rate: 0.001)
o Loss function: mse.
• Performance (on training set) o Loss after 100 epochs = 0.1505.
Neural Network (Classifier)
• Architecture o (#nodes in each hidden layers): (4 i/p)->20->(1 o/p)
o Activation function for hidden layers: ReLu.
o Activation function for output: Sigmoid.
• Optimization o batch_size=100,000.
o Optimizer: Adam (learning rate: 0.01)
o Loss function: binary_crossentropy.
o Regularization: 40% dropout in hidden layer.
• Performance (on training set) o Loss after 100 epochs = 0.6926.
o Accuracy (classification rate): 0.5141.
• Performance (on test set) o Accuracy (classification rate): 0.4844.
• Return (long top decile and short bottom decile) = -1.66% (annualized).
I used Quandl data (EOD dataset) to construct the 13 features as suggested in the paper.
I used different learning rates and regularization approaches but, results do not differ drastically. Interstingly, a naive approach to go long (on every stock) in given period yields +19.34% return. This is not surprising since the test period is 2018, and the market grew at an equivalent rate.
Looking forward to your thoughts.
I like your blogs but I think you are missing something for ML algo now. It can be adaptive if you are using rolling window with weights to retrain. That is the same process as we human being relearning the new environment. DNN may need more data but other ML algos might still be useful. The method in the paper might have "overfitted" the strategy in picking up the network architecture but as they are not directly optimizing on the final PnL I think the "overfitting" problem would be less severe than the normal trading system optimization on the final PnL/Sharpe/Sortino.
I have carried out similar experiments on US stocks and I think your training size is a little bit too small. Nevertheless, the system is not doing very well since 2018 in my setups even if I have used cross-validation to tune the nn/ML structure. The best period in my test period(2000-2017) was right after the tech bubble which corroborates figure 4 in the Stanford paper. Post-2000, my monthly return is much lower(
20% CAGR, 1.6 Sharpe, 16% MaxDD) than the # reported in the paper partly because of using only post-2000 in the test sample.
Adding more data may not help, since.
Currently, training data has close to 3 million obs.
I see your point but I think the original paper was forecasting monthly returns instead of daily returns so you would only have 2500*12*5=150K data point. With.
half for training, you "only" have.
75K data for a deep NN which might be too small?
I guess your usage of forecasting daily returns versus monthly returns might explain why your test resulted in a negative CAGR while mine is still positive albeit much smaller than in the paper.
I, too, forecast monthly returns but, I do not constrain constructing the features for just 1st day of every month. I construct them for every day. This way I have 2,515*1,203=
3M obs. When computing PnL however, I choose a particular day of the month to invest/close a position.
I acknowledge that this way consecutive days will not have much variation in input features/outcome.
Nonetheless, I'll try training on more isolated dates (one each month) as you suggested.
عذرا، هناك خطأ ما. حاول مرة أخرى أو اتصل بنا عن طريق إرسال الملاحظات.
لقد أرسلت بنجاح تذكرة دعم.
سيكون فريق الدعم لدينا على اتصال قريبا.
يتم توفير المواد على هذا الموقع لأغراض إعلامية فقط ولا تشكل عرضا لبيع أو طلب شراء أو توصية أو تأييد لأي أمن أو استراتيجية، كما أنها لا تشكل عرضا لتقديم الخدمات الاستشارية الاستثمارية من قبل كوانتوبيان.
وبالإضافة إلى ذلك، لا تقدم المادة أي رأي فيما يتعلق بملاءمة أي ضمان أو استثمار محدد. لا ینبغي اعتبار أي معلومات واردة في ھذه الوثیقة بمثابة اقتراح للانخراط في أي مسار عمل یتعلق بالاستثمار أو الامتناع عنھ حیث لا یقوم أي من کوانتوبيان أو أي من الشرکات التابعة لھ بتقدیم المشورة الاستثماریة أو العمل کمستشار لأي خطة أو کیان خاضع ل وقانون تأمين دخل التقاعد للموظفين لعام 1974، بصيغته المعدلة، أو حساب التقاعد الفردي أو المعاش التقاعدي الفردي، أو تقديم المشورة بصفة الأمانة فيما يتعلق بالمواد المعروضة في هذه الوثيقة. إذا كنت مستقلا فرديا أو مستثمرا آخر، فاتصل بمستشارك المالي أو أي جهة مالية أخرى لا علاقة لها بكوانتوبيان حول ما إذا كانت أي فكرة استثمار أو إستراتيجية أو منتج أو خدمة معينة مذكورة هنا قد تكون مناسبة لظروفك. وتشمل جميع الاستثمارات مخاطر، بما في ذلك خسارة أصل الدين. لا تقدم كوانتوبيان أي ضمانات بشأن دقة أو اكتمال الآراء المعرب عنها في الموقع. وتخضع اآلراء للتغيير، وقد تصبح غير موثوقة ألسباب مختلفة، بما في ذلك التغيرات في ظروف السوق أو الظروف االقتصادية.
يتم توفير المواد على هذا الموقع لأغراض إعلامية فقط ولا تشكل عرضا لبيع أو طلب شراء أو توصية أو تأييد لأي أمن أو استراتيجية، كما أنها لا تشكل عرضا لتقديم الخدمات الاستشارية الاستثمارية من قبل كوانتوبيان.
وبالإضافة إلى ذلك، لا تقدم المادة أي رأي فيما يتعلق بملاءمة أي ضمان أو استثمار محدد. لا ینبغي اعتبار أي معلومات واردة في ھذه الوثیقة بمثابة اقتراح للانخراط في أي مسار عمل یتعلق بالاستثمار أو الامتناع عنھ حیث لا یقوم أي من کوانتوبيان أو أي من الشرکات التابعة لھ بتقدیم المشورة الاستثماریة أو العمل کمستشار لأي خطة أو کیان خاضع ل وقانون تأمين دخل التقاعد للموظفين لعام 1974، بصيغته المعدلة، أو حساب التقاعد الفردي أو المعاش التقاعدي الفردي، أو تقديم المشورة بصفة الأمانة فيما يتعلق بالمواد المعروضة في هذه الوثيقة. إذا كنت مستقلا فرديا أو مستثمرا آخر، فاتصل بمستشارك المالي أو أي جهة مالية أخرى لا علاقة لها بكوانتوبيان حول ما إذا كانت أي فكرة استثمار أو إستراتيجية أو منتج أو خدمة معينة مذكورة هنا قد تكون مناسبة لظروفك. وتشمل جميع الاستثمارات مخاطر، بما في ذلك خسارة أصل الدين. لا تقدم كوانتوبيان أي ضمانات بشأن دقة أو اكتمال الآراء المعرب عنها في الموقع. وتخضع اآلراء للتغيير، وقد تصبح غير موثوقة ألسباب مختلفة، بما في ذلك التغيرات في ظروف السوق أو الظروف االقتصادية.

Machine Learning for Trading.
Offered at Georgia Tech as CS 7646.
Nanodegree Program.
Machine Learning Engineer.
Make Predictive Models.
Accelerate your career with the credential that fast-tracks you to job success.
About this Course.
This course introduces students to the real world challenges of implementing machine learning based trading strategies including the algorithmic steps from information gathering to market orders. The focus is on how to apply probabilistic machine learning approaches to trading decisions. We consider statistical approaches like linear regression, KNN and regression trees and how to apply them to actual stock trading situations.
Course Cost.
Approx. 4 months.
Skill Level.
Included in Course.
Rich Learning Content.
Taught by Industry Pros.
Student Support Community.
Join the Path to Greatness.
This free course is your first step towards a new career with the Machine Learning Engineer Nanodegree Program.
Free Course.
Machine Learning for Trading.
Enhance your skill set and boost your hirability through innovative, independent learning.
Nanodegree Program.
Machine Learning Engineer.
Accelerate your career with the credential that fast-tracks you to job success.
Course Leads.
Tucker Balch.
Arpan Chakraborty.
What You Will Learn.
This course is composed of three mini-courses :
Mini-course 1: Manipulating Financial Data in Python Mini-course 2: Computational Investing Mini-course 3: Machine Learning Algorithms for Trading.
Each mini-course consists of about 7-10 short lessons. Assignments and projects are interleaved.
Fall 2018 OMS students : There will be two tests - one midterm after mini-course 2, and one final exam.
Prerequisites and Requirements.
Students should have strong coding skills and some familiarity with equity markets. No finance or machine learning experience is assumed.
Note that this course serves students focusing on computer science, as well as students in other majors such as industrial systems engineering, management, or math who have different experiences. All types of students are welcome!
The ML topics might be "review" for CS students, while finance parts will be review for finance students. However, even if you have experience in these topics, you will find that we consider them in a different way than you might have seen before, in particular with an eye towards implementation for trading.
Programming will primarily be in Python. We will make heavy use of numerical computing libraries like NumPy and Pandas.
Why Take This Course.
By the end of this course, you should be able to:
Understand data structures used for algorithmic trading. Know how to construct software to access live equity data, assess it, and make trading decisions. Understand 3 popular machine learning algorithms and how to apply them to trading problems. Understand how to assess a machine learning algorithm's performance for time series data (stock price data). Know how and why data mining (machine learning) techniques fail. Construct a stock trading software system that uses current daily data.
Some limitations/constraints:
We use daily data. This is not an HFT course, but many of the concepts here are relevant. We don't interact (trade) directly with the market, but we will generate equity allocations that you could trade if you wanted to.
What do I get?
Instructor videos Learn by doing exercises Taught by industry professionals.
الدورات ذات الصلة.
Machine Learning: Unsupervised Learning.
Health Informatics in the Cloud.
Knowledge-Based AI: Cognitive Systems.
Big Data Analytics in Healthcare.
Deploying a Hadoop Cluster.
Model Building and Validation.
Popular Courses.
How to Use Git and GitHub.
VR Scenes and Objects.
Featured Programs.
Only At Udacity.
Programs.
Business.
"Nanodegree" is a registered trademark of Udacity. &نسخ؛ 2018–2017 Udacity, Inc.
Udacity is not an accredited university and we don't confer degrees.

Nanalyze.
In previous articles, we’ve defined some of the terms being thrown around lately like “machine learning” and “artificial intelligence“. These disruptive technologies will soon change the world as we know it. While some pundits predicted that we were years away from a computer that could beat a human expert at “Go”, this achievement was recently announced. If a “deep learning” program can now beat a game that has more possible moves than atoms in the known universe, then what’s stopping us from unleashing it upon the stock market and making millions?
The idea of using computers to trade stocks is hardly new. Algorithmic trading (also known as algo trading or black box trading which is a subset of algo trading) has been around for well over a decade and rapidly gaining in popularity. Here’s a look at algorithmic trading as a percentage of market volume:
Source: Morton Glantz, Robert Kissell. Multi-Asset Risk Modeling: Techniques for a Global Economy in an Electronic and Algorithmic Trading Era.
If that trend continues, then this means that today upwards of 90% of trading is being conducted by computer programs. One thing to notice about algorithmic trading is that it has been moving in the direction of shorter and shorter holding times. High frequency trading (HFT) is a subset of algorithmic trading in which stocks are bought and then sold in fractions of a second. This strategy is a form of arbitrage in which the HFT algorithm spots a price discrepancy and then quickly capitalizes on it. As you would expect, HFT trading profits are becoming smaller and smaller but the volume of trades are still dominating the overall market:
Now that we know about algorithmic trading and HFT, just how does machine learning or deep learning come into play? To answer this question, the important variable to take into account is duration. While HFT and algo trading perform trades of a short duration, it becomes much more difficult to “capture alpha” when you start increasing the time frame. The reality is that some of the world’s biggest hedge funds are already all over this space and have been capturing alpha across many durations for a long time now using machine learning.
Early last year, Bridgewater Associates which has $150 billion in assets under management (AUM) started a new artificial intelligence unit led by David Ferrucci who led the development of IBM’s Watson. After working at IBM for 17 years, he was poached by Bridgewater in 2018.
Another firm called Renaissance Technologies has $65 billion in AUM and is said to have “the best physics and mathematics department in the world”. The Medallion Fund at Renaissance, run mostly for employees of the company, has one of the best records in investing history having returned +35% annualized over 20 years. The two co-CEOs of Renaissance were both hired from IBM Research in 1993 where they were working on language-recognition programs.
With $32 billion under management, Two Sigma Investments is known for using AI and machine learning as a key part of their strategy. One co-founder did his PHD in artificial intelligence at MIT and the other was an International Mathematical Olympiad Silver Medalist. Being a finance professional is not a requirement to work at this firm.
While hedge funds such as these 3 are pioneers of using machine learning for stock trading strategies, there are some startups playing in this space as well. Binatix is a deep learning trading firm that came out of stealth mode in 2017 and claims to be nicely profitable having used their strategy for well over three years. Aidyia is a Hong Kong based hedge fund launched in 2018 that trades in U. S. equities and makes all stock trades using artificial intelligence with no human intervention required. Sentient, another deep learning company we discussed before, has developed an artificial intelligence trader that was successful enough that they are consider spinning it out as a prop trading company or asset management firm.
If there’s a startup that shows promise in this space, you can bet that the 3 well established hedge funds we discussed know about it. If you had a machine learning algorithm that generated alpha, would you tell the world about it? Most likely not. But then how would you raise the capital needed to make some serious money off of your strategy? Firms like Bridgewater can be as nimble as any startup and at the same time have $150 billion in capital to play with. It’s hard to compete if you’re a startup that’s trying to get funded. If you’re looking for investors, you have to disclose what you’re doing. Word travels fast. It’s not hard to see hedge funds like Bridgewater poaching talent from AI startups that are trying to play in this space and quickly finding out what they’re up to.
For retail investors to take advantage of machine learning for stock trading, you have a couple directions to take. For ultra high net worth retail investors, you can invest your money in one of the hedge funds using AI like Bridgewater or Renaissance. For those of us who don’t have such large amounts of capital, we can wait for deep learning companies like Sentient to go public or be acquired and then invest in those vehicles. We’ll be keeping a close eye on this space because frankly, it’s just fascinating.
If you pay more than $4.95 a trade , you're paying too much. Ally Invest is one of the lowest-fee brokers around so you spend less money on transaction fees and more on stocks. With more than 30 trades a quarter it drops even lower to $3.95 a trade . Open an account and begin trading today.
Published: April 14, 2018.
5 ETFs and Funds Using AI for Stock Selection.
Is Stitch Fix an Artificial Intelligence IPO?
A Warning About “Artificial Intelligence Stocks”
You said: Algorithmic trading (also known as algo trading or black box trading)
Just wanted to point out that not all algo trading is black box.
Thank you for the clarification David! We noted that in the article.
there is an ETF that allows investors to access these technologies today! NYSE listed ticker symbol ‘BUZ’. Learn more at buzzindexes.
Thank you for the comment Jamie! That was a great interview you had on Squawk Box introducing the BUZ ETF.
Thank you for the heads up!
Subscribe to the Weekly Digest.
Subscribe to the Nanalyze Weekly Digest.
Subscribe to our Nanalyze Weekly Digest to receive a summary of all articles every week.
We’ll never use your email for anything other than sending you great articles about investing in disruptive technologies.

Comments

Popular posts from this blog

تداول العملات الأجنبية في المجر

ما هو الفوركس؟ الفوركس، والمعروف أيضا باسم العملات الأجنبية، فكس أو تداول العملات، هو السوق العالمية اللامركزية حيث جميع العملات في العالم التجارة. سوق الفوركس هو أكبر، السوق الأكثر سيولة في العالم مع متوسط ​​حجم التداول اليومي تتجاوز 5 تريليون $. وجميع أسواق الأسهم العالمية مجتمعة لا تقترب من ذلك. ولكن ماذا يعني ذلك بالنسبة لك؟ نلقي نظرة فاحصة على تداول العملات الأجنبية وقد تجد بعض الفرص التجارية المثيرة غير متوفرة مع الاستثمارات الأخرى. فوريكس ترانزاكتيون: كل شيء في التبادل. إذا كنت قد سافرت في الخارج، كنت قد أجريت معاملة الفوركس. القيام برحلة إلى فرنسا وتحويل جنيهك إلى اليورو. عند القيام بذلك، فإن سعر صرف العملات الأجنبية بين عملتين - على أساس العرض والطلب - يحدد كم يورو تحصل على جنيه الخاص. ويتقلب سعر الصرف بشكل مستمر. جنيه واحد يوم الاثنين يمكن أن تحصل على 1.19 يورو. يوم الثلاثاء، 1.20 يورو. هذا التغيير الصغير قد لا يبدو وكأنه صفقة كبيرة. ولكن التفكير في ذلك على نطاق أوسع. قد تحتاج شركة دولية كبيرة لدفع العاملين في الخارج. تخيل ما يمكن أن يفعله في النتيجة النهائية إذا كان، كما هو ...

استراتيجيات التداول أوتك

أوفر-ذي-كونتر - أوتك. ما هو "الإفراط في مكافحة - أوتك" إن التداول خارج البورصة) أوتك (هو تداول يتم تداوله في بعض السياقات غير تلك التي تتم في بورصة رسمية مثل بورصة نيويورك، بورصة تورونتو، أو بورصة نيويورك، التي كانت تعرف سابقا باسم البورصة األمريكية) أميكس (، . ويمكن استخدام عبارة "دون وصفة طبية" للإشارة إلى الأسهم التي تتاجر عبر شبكة تاجر بدلا من التبادل المركزي. كما يشير إلى سندات الدين والأدوات المالية الأخرى، مثل المشتقات، والتي يتم تداولها من خلال شبكة تاجر. كسر "الإفراط في مواجهة - أوتك" شبكات أوتك الشعبية. تعمل مجموعة أوتك ماركيتس بعض من أكثر الشبكات شهرة، مثل أوتككس بيست ماركيت، و أوتكب فينتيور ماركيت و بينك أوبين ماركيت. وتشمل هذه الأسواق الأسهم غير المدرجة التي من المعروف أن التداول على لوحة الإعلانات عبر العداد (أوتكب) أو على ورقة الوردي. على الرغم من أن ناسداك تعمل كشبكة تاجر، وأسهم ناسداك عموما لا تصنف على أنها أوتك لأن ناسداك يعتبر البورصة. وعلى العكس من ذلك، فإن أسهم أوتكب غالبا ما تكون إما مخزونات بيني أو تقدمها شركات ذات سجلات ائتمانية سيئ...

الفوركس ويكريسي

Wykresy. نيزاليين، دوستسوين، ويكريزي القيام هاندلو. W راماش ناسيغو ويبورو، نيزالنيتش نارزدزي هاندلويش، إيفوريكس أوفيروج بيزباتني، بيزبوريدني دوستب دو زاوانزوانيش ويكرسو هاندلويش i وسكانيكو رينكويش. Są تو łatwe w أوسيسيو، كونفيغوروان ويكريسي، ماجيس zapewnić برزدزيبيوركوم z بودستاويم دوزويادكزينيم هاندلويم، ويلوكروتن أناليزي رام تشاسويش أوراز zdolność دو ويكونيوانيا زاوانزوانيج أناليزي تيشنيكشنيج. تي نيزاليين ويكريسي mogą بوموك إنويستوروم ويزوالني śledzić زمياني سين والوت i أناليز تريندو رينكويش. دوداتكوو، موزنا zobaczyć Historyię وارتوسي كادج باري والتويج، جاك i równiż أوستاتني روتشي. كورزيتشي ويكريسو هاندلويش. وييل رام تشاسويش، بوزوالا هاندلوكوم z łatwością Obserowować تريندي i وزورس نارزدزيا دوستسوان دو بوترزب كايغو برزدزيبيورسي موزليوك ناكادانيا وسكاونيكويو دلا كاديج باري والوت لوب توارو Mogą بوموك برزدزيبيوركوم w بوديجموانيو ديسيزجي w تشاسي رززيويستيم. جيسلي تشيسز skorzystać z ويكريسو إيفوريكس، دوشز دو ناس już dziś! Należy pamiętać، زي analiza zawarta ث wykresach handlowych، المزاح ...