Friday 9 February 2018

أوب و أنظمة التداول الخوارزمية


ميتاترادر ​​4 مقابل 5 - أي واحد؟


أحصل على هذا السؤال كثيرا. كثيرا أن اليوم أريد أن تسوية عشرات مرة واحدة وإلى الأبد في هذا الاستعراض الوحش.


دعونا الحصول على شيء واحد للخروج من الطريق مباشرة. على الرغم من تسلسل واضح في الأسماء، ميتاتريدر 5 ليست خليفة ميتاتريدر 4.


هذه هي اثنين من منصات منفصلة تماما التي يجري تطويرها في موازاة شركة ميتاكوتس البرمجيات. والأمر متروك لكم لاختيار واحد منهم لتداول الخاص بك وهذا هو ما سنناقش هنا.


لقد وجدت أن معظم (إن لم يكن كل) من المقالات التي تقارن ميتاترادر ​​4 مقابل 5 يتم تخفيف مع الفروق الدقيقة في المنصتين. من خلال التركيز على التفاصيل قليلا أنها تفوت الصورة الكبيرة وتفشل في الإجابة على السؤال الرئيسي الجميع مهتم في:


"هل أمسك مع ميتاتريدر 4 أم يجب أن أتحول إلى ميتاتريدر 5؟"


في هذه المدونة سوف نقوم بالرد بالضبط هذا السؤال. في الواقع، أنا ذاهب لرمي في اضافية قليلا.


كونه مروحة صلبة لتجارة الخوارزمية أنا أيضا ذاهب للإجابة على نفس السؤال من وجهة نظر مناطق العد و MQL4 مقابل MQL5 عموما.


حزام أنفسكم في، سيداتي وسادتي. أشياء على وشك الحصول على الساخن!


ميتاترادر ​​4 فس 5.


للبدء، سأحدد كيفية تنظيم هذه المدونة حتى تعرف ما يمكن توقعه.


أولا، في الجزء أ، سنتحدث عن الاختلافات الجوهرية في MT4 و MT5. وأعني تلك التي تهم حقا، وليس "MT5 لديها أزرار أكبر".


في الجزء ب، وسوف أعطيك شيئا لن تجد في أي مكان آخر. تحليل تفصيلي عاما لكيفية تطور MT4 و MT5 على مدى العقد الماضي.


وأخيرا، سنستخلص في القسم الثالث استنتاجا. من ما نناقش في الجزأين الأولين فإن الجواب يبدو واضحا للغاية.


هيا بنا نبدأ.


الجزء ألف - الاختلافات الأساسية (المسائل الأساسية التي تنطوي عليها في الواقع)


في كثير من الأحيان عندما تقرأ عن MT4 مقابل MT5 ترى جدول ومقارنة جنبا إلى جنب من الاثنين. نحن لن نضيع وقتنا على ذلك هنا.


بالتأكيد، هناك اختلافات طفيفة مثل "MT5 لديه تقويم المدمج في و MT4 لا"، "MT5 يدعم 2 دقيقة و 8 ساعات الأطر الزمنية"، وما إلى ذلك ولكن هل تهتم حقا كل ذلك؟


يمكنك إعادة بناء أي إطار زمني تقريبا في MT4 باستخدام البرنامج النصي تحويل الفترة وإذا كنت في حاجة الى التقويم الاقتصادي - فوركسفاكتوري سوف تفعل على ما يرام.


هذه العوامل وأية عوامل أخرى من هذا القبيل لا تذكر. يمكنك إما العمل من حولهم أو إذا التجار حقا مثل ميزة معينة من MT5، سوف ميتاكوتس عاجلا أم آجلا تنفيذها في MT4 أيضا، كما حدث مع ميتترادر ​​4 لفون.


من الناحية الواقعية، هناك ثلاثة فقط الاختلافات الأساسية بين المنصتين التي تهم في الواقع. هؤلاء هم:


أسواق إضافية عبر MT5 قاعدة التحوط MQL4 مقابل MQL5.


دعونا نذهب لهم واحدا تلو الآخر:


البند رقم 1: الأسواق الإضافية.


كان ميتاكوتس يهيمن بالفعل على سوق الفوركس مع منصة MT4 الثورية. فلماذا ميتاتريدر 5؟


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


إذا كان هناك دافع خفي، ماذا يمكن أن يكون؟


السبب الحقيقي (أود أن أقول الرئيسي ولكن أنا ذاهب إلى التمسك الحقيقي) ميتاكوتس وضعت MT5 لأنهم يريدون الوصول إلى الأسواق التي لا يمكن الاستفادة من مع good'ol MT4.


الأسواق الجديدة تعني المزيد من شركات الوساطة، المزيد من العملاء، المزيد من العائدات. وهم يفعلون بشكل جيد حتى الآن. وإليك قائمة نماذج من التبادلات التي يمكنك الوصول إليها عبر ميتاتريدر 5 بالفعل اليوم:


ترى، ميتاتريدر 4 كبيرة للالمركزية، مفتوحة، وغير منظم للغاية على سوق العملات الأجنبية على نطاق عالمي. ومع ذلك، فإنه لا تحقق جميع صناديق كمنصة للأسواق الأخرى.


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


لكن حقا؟ هل تدفق الإيرادات المرتبط بالأسواق المذكورة أعلاه كبير بما فيه الكفاية لتبرير منصة جديدة تماما؟


في حين أن الأسواق مثل وارسو للأوراق المالية و أسك (البورصة الأسترالية) هي انتصارات جيدة، فهي ليست الهدف الرئيسي ل ميتاكوتس. الجائزة الكبرى هي أسواق الأسهم الأمريكية، ويعرف أيضا باسم أسواق الأسهم مع تريليون دولار من السوق:


وهنا اقتباس من الرئيس التنفيذي لشركة ميتاكوتس، رينات فاتخولين، والتي ينبغي أن تعطيك رؤية أفضل لنواياهم لميتاتريدر 5:


منذ البداية كنا نعمل على تطوير نظام التداول [ميتاتريدر 5] دون التحوط. وهو شرط أساسي إذا كنت ترغب في توزيع منصة لأسواق الأسهم.


سنتحدث عن قاعدة عدم التحوط في القسم التالي. ولكن ما يثير الاهتمام هو أنه قبل بضعة أشهر فقط من إطلاق MT5، طبق نفا قاعدة عدم التحوط لتداول العملات الأجنبية أيضا، مما يجعل أساسا MT4 غير صالحة للاستعمال في الولايات المتحدة.


الحظ لا يصدق لرينات! لماذا ا؟ حسنا، حتى الآن لن يتمكن متداولو الفوركس من استخدام ميتاتريدر 4 بعد الآن وسيضطرون للانتقال إلى ميتاتريدر 5. بالتأكيد، إذا كان ميتاكوتس يمكن أن يغزو الأسواق الأمريكية، فإن العالم كله سيحذو حذوه.


نتيجة؟ الهيمنة العالمية، السيطرة الكاملة! جميع الأسواق: الفوركس، والأسهم، والعقود الآجلة، والخيارات، والقائمة تطول - ستتحرك تحت مظلة ميتاتريدر 5. ميتاكوتس الزوجي، ثلاث مرات، 10X انها الإيرادات على مدى بضع سنوات، وربما حتى الاكتتاب من تلقاء نفسها.


خطة بارعة، أليس كذلك؟


باستثناء تفاصيل بسيطة واحدة ... التجار لا يحبون أن يقال ما يمكن وما لا يمكن القيام به ... الذي يجلب لنا لطيف إلى القسم التالي:


البند رقم 2: حكم "عدم الالتزام".


ملاحظة: اقرأ هذا بت الأول إذا لم تكن على دراية قاعدة لا التحوط. وإلا، فلا تتردد في الانتقال إلى "ماذا تعني القاعدة الجديدة للتجار" أدناه.


ما المقصود بقاعدة التحوط هذه؟


ثينفيس منظمة في الولايات المتحدة التي تضمن سلامة السوق في العقود الآجلة، الفوركس، مقايضة، الخ الأسواق.


لا يجوز لأعضاء الفوركس أن يحملوا موازنات في حساب العميل، ولكن يجب عليهم تعويضها على أساس أولا، أولا. بناء على طلب العميل، قد تعوض فدم المعاملات ذات الحجم نفسه حتى إذا كانت هناك معاملات أقدم ذات حجم مختلف ولكن يجب أن تعوض المعاملة مقابل أقدم معاملة من هذا الحجم.


هذه القاعدة تسمى أحيانا قاعدة فيفو (أولا في البداية) واعتمدت في مايو 2009. قبل ذلك يمكنك التحوط المعاملات الخاصة بك عند تداول الفوركس في الولايات المتحدة.


لتوضيح هذا بسرعة - تخيل أنه في ثلاثة أيام متتالية (الإثنين والأربعاء) أجريت المعاملات الثلاث التالية على اليورو مقابل الدولار الأميركي: شراء 1Lot، شراء 1Lot، بيع 3Lots. ويبين الجدول أدناه كيفية تمثيل هذه المعاملات في MT4 و MT5:


يمكنك أن ترى أنه في ميتاتريدر 4 يتم الاحتفاظ بالأوامر بشكل مستقل، بينما في ميتاتريدر 5 يتم تجميع الطلبات معا.


هذا هو المقصود عندما يقولون أن MT4 التحوط، و MT5 ليس لديها التحوط.


ماذا تعني القاعدة الجديدة للتجار؟


شخصيا، أنا لا أرى لماذا سوف نفا / كفتك تشعر بالقلق إزاء التحوط. العالم كله يستخدم التحوط وغرامة معها، لماذا حرمان المواطنين الأمريكيين من هذا الخيار في تداول العملات الأجنبية؟


ماذا يعني التحوط بالنسبة لي؟ عموما، في التداول اليدوي: أعتبر أو تركه - لا صفقة كبيرة. ومع ذلك، عندما يتعلق الأمر التداول الخوارزمية، وقاعدة فيفو هو مصدر قلق كبير. اسمحوا لي أن أشرح لماذا…


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


الشيء الوحيد المشترك بينهما هو أنك قمت بإطلاقها على نفس زوج العملات. ولكن الحيلة هي أنهم لا يعرفون ذلك.


في مرحلة ما، يفتح أحدهم أمر شراء. ثم بعد 10 دقائق يقرر الآخر فتح أمر بيع. BAM! أوامر إلغاء بعضها البعض. لماذا ا؟ لأن مفاجأة مفاجأة لا التحوط!


ولكن هذا لا يساعد وكالات العد، فإنه يخلط بينها فقط. معظم الروبوتات المتقدمة رصد أوامرهم: أداء زائدة من ستوبلوسس، وضبط تاكيبروفيتس، وإغلاق النظام عندما يحين الوقت. ولكن هنا ليس هناك أمر لمراقبة!


كيف سيكون رد فعل إي الخاص بك؟ الجواب: رد فعل غير معروف. ويمكنهم تجاهلها ومواصلة عملهم، أو ... يمكن أن تذهب المكسرات والبدء في إعادة فتح المحموم أوامر "المفقودة".


وهذا من شأنه أن يكلف لكم انتشار اضافية، والعمولة، ولكن الأهم من ذلك - وهذا من شأنه أن يفسد تماما استراتيجيات التداول الخاصة بك. من المرجح جدا أنك قد تفقد الكثير من الأموال على قضية واحدة من هذا القبيل.


هناك طريقتان للخروج من هذا الوضع ل ألغو التجار: 1) التفكير في كل هذا من خلال تصميم استراتيجية التداول الخاصة بك، أو 2) تجنب في وقت واحد إطلاق إي التي يمكن أن تخلق التحوط.


الأول يزيد من تعقيد عملية إنشاء الاستراتيجية الخاصة بك، ويجعل في الواقع بعض الاستراتيجيات ببساطة من المستحيل تنفيذها. هذا الأخير هو تقييد على محفظتك، وبالتالي يحد من إمكانات الكسب من التداول الخاص بك.


أعرف الكثير من القراء من الولايات المتحدة. بالنسبة لي رفاق أردت أن أقول أن من هذا المنظور فهم تماما لماذا كنت لا تحب حكم فيفو الجديد. أنها تمتص!


لا أرى قاعدة فيفو توفير أي فوائد للتاجر على الإطلاق. ما هو "حماية" ضد؟ فإنه يحد فقط قدرتك على إنشاء استراتيجيات مستقلة.


على محمل الجد الرجال، إذا كان أي شخص يعرف كيف حكم فيفو هو "جيد" للتاجر يرجى نشر في قسم التعليقات أدناه. سأكون مهتما لسماع أفكارك. ربما أنا في عداد المفقودين شيء ...


كيف ميتاكوتس شوت ثيمزيلفس في القدم.


حسنا، لذلك حدث فيفو - لا يمكن أن تفعل أي شيء حيال ذلك. نفا هو نفا وعليك أن تلعب من قبل القواعد الجديدة. يمكنني قبول ذلك.


الشيء الوحيد الذي لا أفهم هو لماذا كنت الصعب كود قواعد نفا إلى قطعة من البرمجيات مع قاعدة المستخدمين العالمية؟! من خلال هذه الخطوة جعلت ميتاكوتس تقريبا MT5 منتج الولايات المتحدة فقط، تنفير جزء كبير من قاعدة المستخدمين الخاصة بهم.


المملكة المتحدة وأستراليا وأوروبا، وإلى حد كبير بقية العالم لا يهتمون قاعدة لا التحوط. إذن لماذا التجار في هذه البلدان حتى النظر في التحول إلى MT5 إذا كان يفرض لوائح الولايات المتحدة عليها، عندما لا تضطر إلى طاعة هذه اللوائح؟


وعلاوة على ذلك، فإن الكثير من المستثمرين الأمريكيين انتقلوا منذ ذلك الحين أموالهم إلى الخارج لإيجاد سبل لمواصلة التداول مع التحوط. هذا أمر صعب، لأن معظم السماسرة في جميع أنحاء العالم الآن لن تقبل المواطنين الأميركيين كزبائن. ومع ذلك، أعتقد أن هناك طرقا، لأن الناس يفعلون ذلك.


حتى وسطاء الولايات المتحدة لديها الانقسامات خارج الشاطئ خاصة لخدمة المقيمين من غير الولايات المتحدة. لماذا ا؟ لأن التجار لا تريد أن يقال ما يجب القيام به من قبل نفا.


لا عجب لم تحصل ميتاتريدر 5 على أي امتصاص جوهري. كما نعلم، فإن الطلب تملي أي منتج تقلع قبالة والتي تفشل. في هذا السياق، فشل ميتاتريدر 5: هناك الكثير من السماسرة الذين يقدمون MT4 من تلك التي تقدم MT5.


هذا، يا أصدقائي، هو، يديه، خطأ كبير واحد على جانب ميتاكوتس. فيما كانوا يفكرون؟


إيتم # 3: MQL4 فس MQL5.


ملاحظة: إذا كنت لا ترغب في الترميز والتداول ألغو، ثم يمكنك تخطي معظم هذا القسم. ولكن لا تخطي كل ذلك - الاستنتاج هو المهم.


ما هي البرمجة الموجهة للكائنات (أوب)؟


الضجيج كله حول MQL5 هو أنه يجلب أوب إلى التداول الخوارزمية. هذا هو السبب في الكثير من التجار / المبرمجين كانوا متحمسين جدا حول MT5 في المقام الأول.


بعبارات بسيطة، أوب يسمح لك لكسر البرنامج لك في كتل. كل من هذه الكتل هو مثل مربع أسود: شيء يذهب في وبعض النتائج / أو ينتج العمل:


في عالم البرمجة هذا هو قوي جدا لأسباب متعددة. على سبيل المثال، مرة واحدة كنت قد ترميز واحدة من هذه الصناديق السوداء لأحد المستشارين الخبراء الخاص بك يمكنك ثم استنساخ ذلك واستخدامه في النظام التالي الذي تتطور أيضا.


أيضا، أوب كبيرة للتعاون. يمكنك تعيين مطور واحد للعمل على مجموعة واحدة من الصناديق السوداء، ومطور آخر - على آخر. ثم يمكنك جمعها معا في برنامج نهائي واحد دون حتى معرفة ما هو داخل كل من هذه الكتل.


طالما أنك تعرف ما يدور وما يخرج، يمكنك بناء المنتج النهائي للخروج منها. هذا هو السبب في أنني أحب أن أشرح هذا المفهوم باستخدام مصطلح "الصندوق الأسود".


ويكيبيديا لديها مقال جيد عن أوب، إذا كنت ترغب في مزيد من المعلومات حول هذا الموضوع.


هو أوب حقا أن قيمة في التجارة؟


في رأيي - لا.


لقد وضعت برنامج أوب قبل - العودة في المدرسة الثانوية كانت ضخمة 10،000+ خطوط من برامج التعليمات البرمجية معالجة البرامج الرياضية المعقدة والمشاريع البحثية التعاونية لنمذجة سلوك الروبوتات في المتاهات.


هذا عندما كنت حقا الاستفادة من أوب ... من ناحية أخرى، في التداول، عندما يكون لدي 1000-2000 خطوط من برنامج التعليمات البرمجية، ليست هناك حاجة إلى الإفراط في تعقيد. أنا أكثر من راض عن MQL4 بسيط ويفضل طبيعتها الإجرائية.


أستطيع أن أذهب لفترة من الوقت أكثر حول لماذا أو لماذا لا تستخدم أوب في التداول، ولكن أنا لن. لأن: تخمين ماذا؟


بدءا من بناء 600 أوب متاح في MT4 أيضا. وقد حدث ذلك في شباط / فبراير 2017؛ إذا كنت تريد المزيد من التفاصيل، وتحقق من بيان صحفي.


لذلك، لم تعد أوب ذات صلة بالموضوع MQL4 مقابل المواجهة MQL5. ما هو ذات الصلة، هو التوافق الخلفي، أو أن تكون دقيقة - عدم وجوده.


نو التوافق مع الخلفية.


كما كنت على الارجح على علم، لا يمكنك ببساطة نقل رمز MQL4 الخاص بك في MQL5 - انها لن تعمل فقط.


أخذت ميتاترادر ​​4 في الأصل تداول الفوركس عن طريق العاصفة في الغالب بفضل قدرتها على تشغيل أنظمة التداول الحسابية، أو مناطق العد. نسبة كبيرة من التجار تستخدم مناطق العد أو المؤشرات المخصصة / النصوص في تداولهم. نقل هذه من MQL4 إلى MQL5 سيكون عملية مكلفة جدا وتستغرق وقتا طويلا بالنسبة لمعظم.


ثم لماذا عناء؟ إذا لم يتم إهمال MT4، فإنه من الأسهل بكثير لمواصلة القيام بما كنت تفعل بالطريقة القديمة.


بعض المزايا الحقيقية ل MQL5.


أن نكون منصفين لمطوري MT5، أود أن أذكر اثنين من المزايا المتميزة أن هذا المنبر لديه أكثر من MT4:


1) متعدد العملات اختبار استراتيجية. و.


2) MT5 متفوقة للاختبار والتحسين. مئات الأوقات أسرع.


في حين أن أول من المحتمل أن تكون ذات فائدة لحوالي 10-15٪ من التجار، والثاني هو تحسن كبير. وتعني التحسينات السريعة تقليل الوقت الذي تستغرقه تهيئة مناطق التشغيل، والمزيد من الوقت الذي يقضيه خارج القيام بما تريد.


ولكن للأسف، قضية التوافق المتخلفة حقا تدمر هذه الميزات الرائعة. سوف تنفق المزيد من الوقت إعادة كتابة التعليمات البرمجية الخاصة بك في MQL5 وتصحيحها من سيكون مطلوبا لاختبار الاستراتيجيات الخاصة بك في منصة MT4 أبطأ.


MQL4 فس MQL5 الاستنتاج.


كما حصلنا على أوب لم يعد نقطة من الاحتكاك، لأن كلا MT4 و MT5 لديها الآن.


هناك بعض مزايا كبيرة من MQL5 مثل متعدد العملات اختبار استراتيجية و MT5 أسرع في الاختبار والتحسين. ومع ذلك، عدم وجود التوافق الخلفي بين MQL4 و MQL5 يقتل كل الفوائد.


هذا هو الكرز الخاص بك على رأس الجليد! غياب التوافق مع الخلف هو السبب الرئيسي الثاني لماذا تجار التجزئة لن تتحول من MT4 إلى MT5.


الجزء باء - الأدلة التاريخية.


الآن قد ترى على الأرجح حيث يرأس هذا الاستعراض بأكمله. في هذا القسم سوف نضع الأظافر في نعش ميتاتريدر 5 حتى لا يكون لديك أي شكوك حول مستقبلها.


غوغل تريندس.


باستخدام (مؤشرات غوغل) [غوغل / تريندس /] يمكننا تصور عدد المرات التي تم فيها البحث عن مصطلحي ميتاترادر ​​4 و ميتاترادر ​​5 خلال السنوات العشر الماضية:


نفس التفكير يذهب للمبتدئين في البرمجة - الذهاب مع MT4 و MQL4. سيكون لديك الكثير من المرح والمهارات الخاصة بك وسوف تكون قابلة للتطبيق عبر الكثير من المزيد من شركات الوساطة.


الاستنتاج للمبرمجين ذوي الخبرة يختلف قليلا: إذا كنت تعتقد حقا أنك سوف تحتاج إلى اختبار متعدد العملات الاستراتيجية وكذلك اختبار سريع جدا والتحسين، ثم ربما تعطي MT5 رصاصة واحدة. ومع ذلك، فإنه سيكون فقط يستحق كل هذا العناء إذا كنت تستطيع الالتزام لبناء النظم الخاصة بك من الصفر.


في الوقت نفسه، يجب أن يكون MT4 بالفعل معظم الأشياء التي يحتاجها المبرمج من ذوي الخبرة من أي وقت مضى، بما في ذلك أوب. إذا كان هذا لا يكفي ثم بدلا من MT5 يمكنك إلقاء نظرة على استخدام دل أو حتى منصات أخرى مع أبي جيدة مثل جفوريكس من دوكاسكوبي.


بيثون للتجارة الخوارزمية.


دورة تدريبية عبر الإنترنت في العمق.


الآن التمويل مع دورة بيثون وشملت أشرطة الفيديو.


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


حجز الدورة اليوم على أساس صفقة خاصة لدينا من 219 يورو (بدلا من 299 يورو) و [مدش]؛ أو قراءة على لمعرفة المزيد. الآن التمويل مع دورة بايثون (بما في ذلك 7+ ساعات من تعليمات الفيديو) وشملت.


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


ما يقوله الآخرون.


تحليلات الحائز على جائزة.


ونحن فخورون بأن نكون أفضل 10 حلول تحليلات المصرفية مزود 2017 من قبل المصرفية سيو توقعات.


الكمال التكافل.


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


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


مواضيع الدورة.


هذا هو دورة مكثفة ومتعمقة على الانترنت حول بايثون (الإصدار 3.5) للتجارة الخوارزمية. هذا بالطبع على تقاطع اثنين من المجالات الشاسعة والمثيرة لا يكاد يغطي جميع المواضيع ذات الصلة. ومع ذلك، فإنه يمكن أن تغطي مجموعة من الموضوعات الفوقية الهامة في العمق: البيانات المالية: البيانات المالية هي في صميم كل مشروع التداول حسابي؛ بيثون وحزم مثل نومبي والباندا القيام بعمل رائع في التعامل مع البيانات المالية المنظمة من أي نوع (نهاية اليوم، خلال اليوم، عالية التردد) باكتستينغ: لا الآلي، التداول الخوارزمية دون اختبار صارم لاستراتيجية التداول إلى نشر؛ وتغطي الدورة، من بين أمور أخرى، استراتيجيات التداول أسس على المتوسطات المتحركة البسيطة، والزخم، ومتوسط ​​انعكاس والتنبؤ آلة / عميق التعلم القائم على البيانات في الوقت الحقيقي: التداول الخوارزمية يتطلب التعامل مع البيانات في الوقت الحقيقي، خوارزميات على الانترنت على أساس والتصور في في الوقت الحالى؛ وبطبيعة الحال يدخل إلى البرمجة مأخذ مع زيرومق وتدفق التصور مع منصات على الانترنت بلوتلي: أي تداول من دون منصة التداول. وتغطي الدورة ثلاثة منصات التداول الإلكترونية شعبية: أواندا (تداول العقود مقابل الفروقات)، وسطاء التفاعلية (الأسهم والخيارات التداول) والجوزاء (كريبتوكيرنسي التداول). فإنه يوفر أيضا الطبقات المجمع مريحة في بيثون للحصول على ما يصل وتشغيلها في غضون دقائق الأتمتة: الجمال وكذلك بعض التحديات الرئيسية في نتيجة التداول حسابي من أتمتة عملية التداول. وتظهر الدورة كيفية نشر بايثون في السحابة وكيفية إعداد بيئة مناسبة لتجارة الآلي، حسابي.


جدول المحتويات.


إلقاء نظرة على جدول (الحالي) محتويات النسخة بدف من المواد دورة على الانترنت.


التفرد والفوائد.


تقدم الدورة تجربة تعليمية فريدة من نوعها مع الميزات والفوائد التالية. تغطية المواضيع ذات الصلة: هو المسار الوحيد الذي يغطي هذا اتساع وعمق فيما يتعلق بالموضوعات ذات الصلة في بيثون لقاعدة بيانات التداول الذاتي القائم على خوارزمية: ويرافق بالطبع من قبل مستودع جيت على منصة كوانت تحتوي على جميع رموز في النفس - القسم القابل للتنفيذ (3000+ سطر من التعليمات البرمجية) نسخة كتاب بدف: بالإضافة إلى النسخة الإلكترونية من الدورة، وهناك أيضا نسخة كتاب بدف (450+ صفحات) التدريب عبر الإنترنت / الفيديو (اختياري): بيثون تقدم كوانتس فئة تدريبية عبر الإنترنت وفيديو (غير مدرجة) بناء على هذا المقرر / الكتاب الذي يوفر تجربة تعليمية تفاعلية (على سبيل المثال، للاطلاع على الشفرة التي يتم تنفيذها مباشرة، لطرح الأسئلة الفردية)، فضلا عن إلقاء نظرة على مواضيع إضافية أو في مواضيع من زاوية مختلفة التداول الحقيقي كهدف: تغطية ثلاثة منصات التداول عبر الإنترنت المختلفة يضع الطالب في موقف لبدء كل من الورق والتجارة الحية بكفاءة. هذا بالطبع يزود الطالب مع المعرفة الخلفية ذات الصلة والعملية والقيمة تفعل ذلك بنفسك والنهج الذاتي: منذ المواد والمدونات هي مكتفية ذاتيا والاعتماد فقط على حزم بيثون القياسية، يكون الطالب لديه المعرفة الكاملة والكامل والسيطرة على ما يجري، وكيفية استخدام أمثلة التعليمات البرمجية، وكيفية تغييرها، وما إلى ذلك؛ ليست هناك حاجة إلى الاعتماد على منصات طرف ثالث، على سبيل المثال، للقيام باكتستينغ أو للاتصال منصات التداول؛ يمكنك أن تفعل كل هذا بنفسك مع هذا بالطبع و [مدش]؛ بوتيرة التي هي الأكثر ملاءمة و [مدش]؛ وكان لديك كل سطر واحد من التعليمات البرمجية للقيام بذلك منتدى المستخدم المتاحة: على الرغم من أنك من المفترض أن تكون قادرة على القيام بذلك كل شيء من قبل نفسك، ونحن هناك لمساعدتك؛ يمكنك نشر الأسئلة والتعليقات في منتدى المستخدم لدينا. ونحن نهدف إلى متابعة في غضون 24 ساعة المالية مع دورة بايثون: لدينا دورة تمهيدية الآن مدرجة بالكامل في هذه الحزمة مع 150+ صفحات من محتوى بدف، جوبيتر أجهزة الكمبيوتر المحمولة و 7+ ساعات من تعليمات الفيديو.


نظرة عامة على الفيديو.


أدناه فيديو قصير (حوالي 4 دقائق) مما يتيح لك لمحة فنية عن المواد الدراسية (محتويات وبيثون رموز) على موقعنا كوانت والتدريب منصة.


حول المؤلف بالطبع.


الدكتور إيف J. هيلبيشش هو مؤسس وشريك إدارة بيثون كوانتس، وهي مجموعة تركز على استخدام تكنولوجيات مفتوحة المصدر لعلم البيانات المالية، التداول الخوارزمية والتمويل الحسابي. وهو مؤلف الكتب.


إيف محاضرات عن التمويل الحسابي في برنامج سكف، على علوم البيانات في جامعة هتو سار للعلوم التطبيقية ومدير لبرنامج التدريب عبر الإنترنت مما أدى إلى أول بيثون لشهادة جامعة المالية (منحت من قبل هتو سار).


وقد كتب إيف مكتبة التحليلات المالية دكس تحليلات وينظم لقاءات ومؤتمرات حول بايثون للتمويل الكمي في فرانكفورت ولندن ونيويورك. كما ألقى خطابا رئيسيا فى مؤتمرات التكنولوجيا فى الولايات المتحدة وأوروبا وآسيا.


جيت مستودع.


يتم توفير جميع رموز بيثون و جوبيتر أجهزة الكمبيوتر المحمولة كمستودع جيت على منصة كوانت لسهولة التحديث وأيضا الاستخدام المحلي. تأكد من أن يكون تركيب علمية بيثون 3.5 شاملة جاهزة.


ترتيب الدورة.


حاليا، نحن نقدم لك صفقة خاصة عند الاشتراك اليوم. تدفع فقط.


بدلا من السعر العادي 299 يورو. المواد لا تزال قيد التطوير. مع التسجيل الخاص بك اليوم يمكنك أيضا الوصول الآمن إلى التحديثات المستقبلية. هذا ينبغي أن تساعدك قليلا جدا في اتخاذ هذا القرار المحتمل تغيير مهنة. لم يكن يوما أسهل لإتقان بايثون للتجارة الخوارزمية.


ببساطة وضع النظام الخاص بك من خلال باي بال والتي يمكنك أيضا استخدام بطاقة الائتمان الخاصة بك.


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


QuantStart.


الانضمام إلى كوانتكاديمي بوابة العضوية الخاصة التي تلبي احتياجات التجزئة المتزايد بسرعة المجتمع تاجر الكمي. سوف تجد مجموعة من ذوي الخبرة مثل التفكير من التجار الكميون على استعداد للرد على أسئلة التداول الكمي الأكثر إلحاحا.


تحقق من بلدي يبوك على التداول الكمي حيث أنا يعلمك كيفية بناء مربحة استراتيجيات التداول المنهجي مع أدوات بايثون، من الصفر.


نلقي نظرة على بلدي الكتاب الاليكتروني الجديد على استراتيجيات التداول المتقدمة باستخدام تحليل سلسلة زمنية، والتعلم الآلي والإحصاءات بايزي، مع بيثون و R.


من قبل مايكل هالز مور في 26 يوليو، 2018.


واحدة من الأسئلة الأكثر تواترا التي تلقيتها في كيس البريد قس هو "ما هي أفضل لغة البرمجة للتجارة الخوارزمية؟". الجواب القصير هو أنه لا توجد لغة "أفضل". يجب النظر في معايير الاستراتيجية، والأداء، نمطية، والتنمية، والمرونة والتكلفة. سوف توضح هذه المقالة المكونات الضرورية لهيكل نظام التداول الخوارزمي وكيف تؤثر القرارات المتعلقة بالتنفيذ على اختيار اللغة.


أولا، سيتم النظر في المكونات الرئيسية لنظام التداول الخوارزمي، مثل أدوات البحث، ومحفظة المحفظة، ومدير المخاطر ومحرك التنفيذ. وفي وقت لاحق، سيتم دراسة استراتيجيات التداول المختلفة وكيفية تأثيرها على تصميم النظام. على وجه الخصوص وتيرة التداول وحجم التداول المحتمل على حد سواء سيتم مناقشتها.


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


ما هو نظام التداول في محاولة للقيام به؟


قبل اتخاذ قرار بشأن "أفضل" اللغة التي لكتابة نظام التداول الآلي من الضروري تحديد المتطلبات. هل سيكون النظام قائما على التنفيذ فقط؟ هل يتطلب النظام إدارة مخاطر أو وحدة بناء محفظة؟ سوف يتطلب النظام باكتستر عالية الأداء؟ بالنسبة لمعظم الاستراتيجيات نظام التداول يمكن تقسيمها إلى فئتين: البحوث وتوليد إشارة.


وتتعلق البحوث بتقييم أداء الاستراتيجية على البيانات التاريخية. إن عملية تقييم إستراتيجية التداول على بيانات السوق السابقة تعرف باختصار. وسيكون حجم البيانات والتعقيد الخوارزمي لها تأثير كبير على كثافة الحسابية من باكتستر. سرعة وحدة المعالجة المركزية والتزامن غالبا ما تكون العوامل المحددة في تحسين سرعة تنفيذ البحث.


ويتعلق توليد الإشارة بتوليد مجموعة من إشارات التداول من خوارزمية وإرسال هذه الأوامر إلى السوق، وعادة عن طريق الوساطة. بالنسبة لبعض الإستراتیجیات، یلزم وجود مستوى عال من الأداء. قضايا الإدخال / الإخراج مثل عرض النطاق الترددي للشبكة والكمون غالبا ما تكون العامل المحدد في تحسين أنظمة التنفيذ. وبالتالي فإن اختيار اللغات لكل مكون من مكونات النظام بأكمله قد يكون مختلفا تماما.


نوع، وتيرة وحجم الاستراتيجية.


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


خيارات التكنولوجيا لاستراتيجية منخفضة الأسهم الأسهم الولايات المتحدة سوف تختلف اختلافا كبيرا عن تلك التي من استراتيجية عالية التردد التحكيم الإحصائية التداول في سوق العقود الآجلة. قبل اختيار اللغة يجب تقييم العديد من بائعي البيانات التي تتعلق باستراتيجية في متناول اليد.


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


ومن المرجح أن يكون تكرار الاستراتيجية واحدا من أكبر العوامل الدافعة لكيفية تحديد كومة التكنولوجيا. الاستراتيجيات التي تستخدم بيانات أكثر تواترا من الحانات بدقة أو الثانية تتطلب اهتماما كبيرا فيما يتعلق بالأداء.


وتؤدي الاستراتيجية التي تتجاوز الحدود الثانية (أي بيانات القراد) إلى تصميم مدعوم بالأداء باعتباره الشرط الأساسي. وبالنسبة للاستراتيجيات ذات التردد العالي، سيلزم تخزين كمية كبيرة من بيانات السوق وتقييمها. برامج مثل HDF5 أو كدب + تستخدم عادة لهذه الأدوار.


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


نظم البحوث.


نظم البحوث عادة ما تنطوي على مزيج من التنمية التفاعلية والنصوص الآلي. وغالبا ما يحدث الأول داخل إيد مثل فيسوال ستوديو، ماتلاب أو R ستوديو. ويشمل هذا الأخير حسابات عددية واسعة النطاق على العديد من المعلمات ونقاط البيانات. وهذا يؤدي إلى اختيار اللغة توفير بيئة مباشرة لاختبار التعليمات البرمجية، ولكن أيضا يوفر أداء كافيا لتقييم الاستراتيجيات على أبعاد متعددة المعلمة.


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


ل باكتستينغ العددية، جميع اللغات المذكورة أعلاه هي مناسبة، على الرغم من أنه ليس من الضروري استخدام واجهة المستخدم الرسومية / إيد كما سيتم تنفيذ التعليمات البرمجية "في الخلفية". الاعتبار الرئيسي في هذه المرحلة هو سرعة التنفيذ. غالبا ما تكون اللغة المترجمة (مثل C ++) مفيدة إذا كانت أبعاد معلمة باكتستينغ كبيرة. تذكر أنه من الضروري أن نكون حذرين من هذه الأنظمة إذا كان هذا هو الحال!


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


إدارة المحفظة وإدارة المخاطر.


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


Sophisticated versions of these components can have a significant effect on the quality and consistentcy of profitability. It is straightforward to create a stable of strategies as the portfolio construction mechanism and risk manager can easily be modified to handle multiple systems. Thus they should be considered essential components at the outset of the design of an algorithmic trading system.


The job of the portfolio construction system is to take a set of desired trades and produce the set of actual trades that minimise churn, maintain exposures to various factors (such as sectors, asset classes, volatility etc) and optimise the allocation of capital to various strategies in a portfolio.


Portfolio construction often reduces to a linear algebra problem (such as a matrix factorisation) and hence performance is highly dependent upon the effectiveness of the numerical linear algebra implementation available. Common libraries include uBLAS, LAPACK and NAG for C++. MatLab also possesses extensively optimised matrix operations. Python utilises NumPy/SciPy for such computations. A frequently rebalanced portfolio will require a compiled (and well optimised!) matrix library to carry this step out, so as not to bottleneck the trading system.


Risk management is another extremely important part of an algorithmic trading system. Risk can come in many forms: Increased volatility (although this may be seen as desirable for certain strategies!), increased correlations between asset classes, counter-party default, server outages, "black swan" events and undetected bugs in the trading code, to name a few.


Risk management components try and anticipate the effects of excessive volatility and correlation between asset classes and their subsequent effect(s) on trading capital. Often this reduces to a set of statistical computations such as Monte Carlo "stress tests". This is very similar to the computational needs of a derivatives pricing engine and as such will be CPU-bound. These simulations are highly parallelisable (see below) and, to a certain degree, it is possible to "throw hardware at the problem".


أنظمة التنفيذ.


The job of the execution system is to receive filtered trading signals from the portfolio construction and risk management components and send them on to a brokerage or other means of market access. For the majority of retail algorithmic trading strategies this involves an API or FIX connection to a brokerage such as Interactive Brokers. The primary considerations when deciding upon a language include quality of the API, language-wrapper availability for an API, execution frequency and the anticipated slippage.


The "quality" of the API refers to how well documented it is, what sort of performance it provides, whether it needs standalone software to be accessed or whether a gateway can be established in a headless fashion (i. e. no GUI). In the case of Interactive Brokers, the Trader WorkStation tool needs to be running in a GUI environment in order to access their API. I once had to install a Desktop Ubuntu edition onto an Amazon cloud server to access Interactive Brokers remotely, purely for this reason!


Most APIs will provide a C++ and/or Java interface. It is usually up to the community to develop language-specific wrappers for C#, Python, R, Excel and MatLab. Note that with every additional plugin utilised (especially API wrappers) there is scope for bugs to creep into the system. Always test plugins of this sort and ensure they are actively maintained. A worthwhile gauge is to see how many new updates to a codebase have been made in recent months.


Execution frequency is of the utmost importance in the execution algorithm. Note that hundreds of orders may be sent every minute and as such performance is critical. Slippage will be incurred through a badly-performing execution system and this will have a dramatic impact on profitability.


Statically-typed languages (see below) such as C++/Java are generally optimal for execution but there is a trade-off in development time, testing and ease of maintenance. Dynamically-typed languages, such as Python and Perl are now generally "fast enough". Always make sure the components are designed in a modular fashion (see below) so that they can be "swapped out" out as the system scales.


Architectural Planning and Development Process.


The components of a trading system, its frequency and volume requirements have been discussed above, but system infrastructure has yet to be covered. Those acting as a retail trader or working in a small fund will likely be "wearing many hats". It will be necessary to be covering the alpha model, risk management and execution parameters, and also the final implementation of the system. Before delving into specific languages the design of an optimal system architecture will be discussed.


Separation of Concerns.


One of the most important decisions that must be made at the outset is how to "separate the concerns" of a trading system. في تطوير البرمجيات، وهذا يعني أساسا كيفية تفريق مختلف جوانب النظام التجاري إلى مكونات وحدات منفصلة.


By exposing interfaces at each of the components it is easy to swap out parts of the system for other versions that aid performance, reliability or maintenance, without modifying any external dependency code. This is the "best practice" for such systems. For strategies at lower frequencies such practices are advised. For ultra high frequency trading the rulebook might have to be ignored at the expense of tweaking the system for even more performance. A more tightly coupled system may be desirable.


Creating a component map of an algorithmic trading system is worth an article in itself. However, an optimal approach is to make sure there are separate components for the historical and real-time market data inputs, data storage, data access API, backtester, strategy parameters, portfolio construction, risk management and automated execution systems.


For instance, if the data store being used is currently underperforming, even at significant levels of optimisation, it can be swapped out with minimal rewrites to the data ingestion or data access API. As far the as the backtester and subsequent components are concerned, there is no difference.


Another benefit of separated components is that it allows a variety of programming languages to be used in the overall system. There is no need to be restricted to a single language if the communication method of the components is language independent. This will be the case if they are communicating via TCP/IP, ZeroMQ or some other language-independent protocol.


As a concrete example, consider the case of a backtesting system being written in C++ for "number crunching" performance, while the portfolio manager and execution systems are written in Python using SciPy and IBPy.


Performance Considerations.


Performance is a significant consideration for most trading strategies. For higher frequency strategies it is the most important factor. "Performance" covers a wide range of issues, such as algorithmic execution speed, network latency, bandwidth, data I/O, concurrency/parallelism and scaling. Each of these areas are individually covered by large textbooks, so this article will only scratch the surface of each topic. Architecture and language choice will now be discussed in terms of their effects on performance.


The prevailing wisdom as stated by Donald Knuth, one of the fathers of Computer Science, is that "premature optimisation is the root of all evil". This is almost always the case - except when building a high frequency trading algorithm! For those who are interested in lower frequency strategies, a common approach is to build a system in the simplest way possible and only optimise as bottlenecks begin to appear.


Profiling tools are used to determine where bottlenecks arise. Profiles can be made for all of the factors listed above, either in a MS Windows or Linux environment. There are many operating system and language tools available to do so, as well as third party utilities. Language choice will now be discussed in the context of performance.


C++, Java, Python, R and MatLab all contain high-performance libraries (either as part of their standard or externally) for basic data structure and algorithmic work. C++ ships with the Standard Template Library, while Python contains NumPy/SciPy. Common mathematical tasks are to be found in these libraries and it is rarely beneficial to write a new implementation.


One exception is if highly customised hardware architecture is required and an algorithm is making extensive use of proprietary extensions (such as custom caches). However, often "reinvention of the wheel" wastes time that could be better spent developing and optimising other parts of the trading infrastructure. Development time is extremely precious especially in the context of sole developers.


Latency is often an issue of the execution system as the research tools are usually situated on the same machine. For the former, latency can occur at multiple points along the execution path. Databases must be consulted (disk/network latency), signals must be generated (operating syste, kernal messaging latency), trade signals sent (NIC latency) and orders processed (exchange systems internal latency).


For higher frequency operations it is necessary to become intimately familiar with kernal optimisation as well as optimisation of network transmission. This is a deep area and is significantly beyond the scope of the article but if an UHFT algorithm is desired then be aware of the depth of knowledge required!


Caching is very useful in the toolkit of a quantitative trading developer. Caching refers to the concept of storing frequently accessed data in a manner which allows higher-performance access, at the expense of potential staleness of the data. A common use case occurs in web development when taking data from a disk-backed relational database and putting it into memory. Any subsequent requests for the data do not have to "hit the database" and so performance gains can be significant.


For trading situations caching can be extremely beneficial. For instance, the current state of a strategy portfolio can be stored in a cache until it is rebalanced, such that the list doesn't need to be regenerated upon each loop of the trading algorithm. Such regeneration is likely to be a high CPU or disk I/O operation.


However, caching is not without its own issues. Regeneration of cache data all at once, due to the volatilie nature of cache storage, can place significant demand on infrastructure. وثمة مسألة أخرى هي تكديس الكلاب، حيث يتم تنفيذ أجيال متعددة من نسخة مخبأ جديدة تحت حمولة عالية للغاية، الأمر الذي يؤدي إلى فشل سلسلة.


Dynamic memory allocation is an expensive operation in software execution. Thus it is imperative for higher performance trading applications to be well-aware how memory is being allocated and deallocated during program flow. Newer language standards such as Java, C# and Python all perform automatic garbage collection , which refers to deallocation of dynamically allocated memory when objects go out of scope .


Garbage collection is extremely useful during development as it reduces errors and aids readability. However, it is often sub-optimal for certain high frequency trading strategies. Custom garbage collection is often desired for these cases. In Java, for instance, by tuning the garbage collector and heap configuration, it is possible to obtain high performance for HFT strategies.


C++ doesn't provide a native garbage collector and so it is necessary to handle all memory allocation/deallocation as part of an object's implementation. While potentially error prone (potentially leading to dangling pointers) it is extremely useful to have fine-grained control of how objects appear on the heap for certain applications. When choosing a language make sure to study how the garbage collector works and whether it can be modified to optimise for a particular use case.


Many operations in algorithmic trading systems are amenable to parallelisation . This refers to the concept of carrying out multiple programmatic operations at the same time, i. e in "parallel". So-called "embarassingly parallel" algorithms include steps that can be computed fully independently of other steps. Certain statistical operations, such as Monte Carlo simulations, are a good example of embarassingly parallel algorithms as each random draw and subsequent path operation can be computed without knowledge of other paths.


Other algorithms are only partially parallelisable. Fluid dynamics simulations are such an example, where the domain of computation can be subdivided, but ultimately these domains must communicate with each other and thus the operations are partially sequential. Parallelisable algorithms are subject to Amdahl's Law, which provides a theoretical upper limit to the performance increase of a parallelised algorithm when subject to $N$ separate processes (e. g. on a CPU core or thread ).


Parallelisation has become increasingly important as a means of optimisation since processor clock-speeds have stagnated, as newer processors contain many cores with which to perform parallel calculations. The rise of consumer graphics hardware (predominently for video games) has lead to the development of Graphical Processing Units (GPUs), which contain hundreds of "cores" for highly concurrent operations. Such GPUs are now very affordable. High-level frameworks, such as Nvidia's CUDA have lead to widespread adoption in academia and finance.


Such GPU hardware is generally only suitable for the research aspect of quantitative finance, whereas other more specialised hardware (including Field-Programmable Gate Arrays - FPGAs) are used for (U)HFT. Nowadays, most modern langauges support a degree of concurrency/multithreading. Thus it is straightforward to optimise a backtester, since all calculations are generally independent of the others.


Scaling in software engineering and operations refers to the ability of the system to handle consistently increasing loads in the form of greater requests, higher processor usage and more memory allocation. In algorithmic trading a strategy is able to scale if it can accept larger quantities of capital and still produce consistent returns. The trading technology stack scales if it can endure larger trade volumes and increased latency, without bottlenecking .


While systems must be designed to scale, it is often hard to predict beforehand where a bottleneck will occur. Rigourous logging, testing, profiling and monitoring will aid greatly in allowing a system to scale. Languages themselves are often described as "unscalable". This is usually the result of misinformation, rather than hard fact. It is the total technology stack that should be ascertained for scalability, not the language. Clearly certain languages have greater performance than others in particular use cases, but one language is never "better" than another in every sense.


One means of managing scale is to separate concerns, as stated above. In order to further introduce the ability to handle "spikes" in the system (i. e. sudden volatility which triggers a raft of trades), it is useful to create a "message queuing architecture". This simply means placing a message queue system between components so that orders are "stacked up" if a certain component is unable to process many requests.


Rather than requests being lost they are simply kept in a stack until the message is handled. This is particularly useful for sending trades to an execution engine. If the engine is suffering under heavy latency then it will back up trades. A queue between the trade signal generator and the execution API will alleviate this issue at the expense of potential trade slippage. A well-respected open source message queue broker is RabbitMQ.


Hardware and Operating Systems.


The hardware running your strategy can have a significant impact on the profitability of your algorithm. This is not an issue restricted to high frequency traders either. A poor choice in hardware and operating system can lead to a machine crash or reboot at the most inopportune moment. Thus it is necessary to consider where your application will reside. The choice is generally between a personal desktop machine, a remote server, a "cloud" provider or an exchange co-located server.


Desktop machines are simple to install and administer, especially with newer user friendly operating systems such as Windows 7/8, Mac OSX and Ubuntu. Desktop systems do possess some significant drawbacks, however. The foremost is that the versions of operating systems designed for desktop machines are likely to require reboots/patching (and often at the worst of times!). They also use up more computational resources by the virtue of requiring a graphical user interface (GUI).


Utilising hardware in a home (or local office) environment can lead to internet connectivity and power uptime problems. The main benefit of a desktop system is that significant computational horsepower can be purchased for the fraction of the cost of a remote dedicated server (or cloud based system) of comparable speed.


A dedicated server or cloud-based machine, while often more expensive than a desktop option, allows for more significant redundancy infrastructure, such as automated data backups, the ability to more straightforwardly ensure uptime and remote monitoring. They are harder to administer since they require the ability to use remote login capabilities of the operating system.


In Windows this is generally via the GUI Remote Desktop Protocol (RDP). In Unix-based systems the command-line Secure SHell (SSH) is used. Unix-based server infrastructure is almost always command-line based which immediately renders GUI-based programming tools (such as MatLab or Excel) to be unusable.


A co-located server, as the phrase is used in the capital markets, is simply a dedicated server that resides within an exchange in order to reduce latency of the trading algorithm. This is absolutely necessary for certain high frequency trading strategies, which rely on low latency in order to generate alpha.


The final aspect to hardware choice and the choice of programming language is platform-independence. Is there a need for the code to run across multiple different operating systems? Is the code designed to be run on a particular type of processor architecture, such as the Intel x86/x64 or will it be possible to execute on RISC processors such as those manufactured by ARM? These issues will be highly dependent upon the frequency and type of strategy being implemented.


Resilience and Testing.


One of the best ways to lose a lot of money on algorithmic trading is to create a system with no resiliency . This refers to the durability of the sytem when subject to rare events, such as brokerage bankruptcies, sudden excess volatility, region-wide downtime for a cloud server provider or the accidental deletion of an entire trading database. Years of profits can be eliminated within seconds with a poorly-designed architecture. It is absolutely essential to consider issues such as debuggng, testing, logging, backups, high-availability and monitoring as core components of your system.


It is likely that in any reasonably complicated custom quantitative trading application at least 50% of development time will be spent on debugging, testing and maintenance.


Nearly all programming languages either ship with an associated debugger or possess well-respected third-party alternatives. In essence, a debugger allows execution of a program with insertion of arbitrary break points in the code path, which temporarily halt execution in order to investigate the state of the system. The main benefit of debugging is that it is possible to investigate the behaviour of code prior to a known crash point .


Debugging is an essential component in the toolbox for analysing programming errors. However, they are more widely used in compiled languages such as C++ or Java, as interpreted languages such as Python are often easier to debug due to fewer LOC and less verbose statements. Despite this tendency Python does ship with the pdb, which is a sophisticated debugging tool. The Microsoft Visual C++ IDE possesses extensive GUI debugging utilities, while for the command line Linux C++ programmer, the gdb debugger exists.


Testing in software development refers to the process of applying known parameters and results to specific functions, methods and objects within a codebase, in order to simulate behaviour and evaluate multiple code-paths, helping to ensure that a system behaves as it should. A more recent paradigm is known as Test Driven Development (TDD), where test code is developed against a specified interface with no implementation. Prior to the completion of the actual codebase all tests will fail. As code is written to "fill in the blanks", the tests will eventually all pass, at which point development should cease.


TDD requires extensive upfront specification design as well as a healthy degree of discipline in order to carry out successfully. In C++, Boost provides a unit testing framework. In Java, the JUnit library exists to fulfill the same purpose. Python also has the unittest module as part of the standard library. Many other languages possess unit testing frameworks and often there are multiple options.


In a production environment, sophisticated logging is absolutely essential. Logging refers to the process of outputting messages, with various degrees of severity, regarding execution behaviour of a system to a flat file or database. Logs are a "first line of attack" when hunting for unexpected program runtime behaviour. Unfortunately the shortcomings of a logging system tend only to be discovered after the fact! As with backups discussed below, a logging system should be given due consideration BEFORE a system is designed.


Both Microsoft Windows and Linux come with extensive system logging capability and programming languages tend to ship with standard logging libraries that cover most use cases. It is often wise to centralise logging information in order to analyse it at a later date, since it can often lead to ideas about improving performance or error reduction, which will almost certainly have a positive impact on your trading returns.


While logging of a system will provide information about what has transpired in the past, monitoring of an application will provide insight into what is happening right now . All aspects of the system should be considered for monitoring. System level metrics such as disk usage, available memory, network bandwidth and CPU usage provide basic load information.


Trading metrics such as abnormal prices/volume, sudden rapid drawdowns and account exposure for different sectors/markets should also be continuously monitored. Further, a threshold system should be instigated that provides notification when certain metrics are breached, elevating the notification method (email, SMS, automated phone call) depending upon the severity of the metric.


System monitoring is often the domain of the system administrator or operations manager. However, as a sole trading developer, these metrics must be established as part of the larger design. Many solutions for monitoring exist: proprietary, hosted and open source, which allow extensive customisation of metrics for a particular use case.


Backups and high availability should be prime concerns of a trading system. Consider the following two questions: 1) If an entire production database of market data and trading history was deleted (without backups) how would the research and execution algorithm be affected? 2) If the trading system suffers an outage for an extended period (with open positions) how would account equity and ongoing profitability be affected? The answers to both of these questions are often sobering!


It is imperative to put in place a system for backing up data and also for testing the restoration of such data. Many individuals do not test a restore strategy. If recovery from a crash has not been tested in a safe environment, what guarantees exist that restoration will be available at the worst possible moment?


Similarly, high availability needs to be "baked in from the start". Redundant infrastructure (even at additional expense) must always be considered, as the cost of downtime is likely to far outweigh the ongoing maintenance cost of such systems. I won't delve too deeply into this topic as it is a large area, but make sure it is one of the first considerations given to your trading system.


Choosing a Language.


Considerable detail has now been provided on the various factors that arise when developing a custom high-performance algorithmic trading system. The next stage is to discuss how programming languages are generally categorised.


Type Systems.


When choosing a language for a trading stack it is necessary to consider the type system . The languages which are of interest for algorithmic trading are either statically - or dynamically-typed . A statically-typed language performs checks of the types (e. g. integers, floats, custom classes etc) during the compilation process. Such languages include C++ and Java. A dynamically-typed language performs the majority of its type-checking at runtime. Such languages include Python, Perl and JavaScript.


For a highly numerical system such as an algorithmic trading engine, type-checking at compile time can be extremely beneficial, as it can eliminate many bugs that would otherwise lead to numerical errors. However, type-checking doesn't catch everything, and this is where exception handling comes in due to the necessity of having to handle unexpected operations. 'Dynamic' languages (i. e. those that are dynamically-typed) can often lead to run-time errors that would otherwise be caught with a compilation-time type-check. For this reason, the concept of TDD (see above) and unit testing arose which, when carried out correctly, often provides more safety than compile-time checking alone.


Another benefit of statically-typed languages is that the compiler is able to make many optimisations that are otherwise unavailable to the dynamically - typed language, simply because the type (and thus memory requirements) are known at compile-time. In fact, part of the inefficiency of many dynamically-typed languages stems from the fact that certain objects must be type-inspected at run-time and this carries a performance hit. Libraries for dynamic languages, such as NumPy/SciPy alleviate this issue due to enforcing a type within arrays.


Open Source or Proprietary?


One of the biggest choices available to an algorithmic trading developer is whether to use proprietary (commercial) or open source technologies. There are advantages and disadvantages to both approaches. It is necessary to consider how well a language is supported, the activity of the community surrounding a language, ease of installation and maintenance, quality of the documentation and any licensing/maintenance costs.


The Microsoft stack (including Visual C++, Visual C#) and MathWorks' MatLab are two of the larger proprietary choices for developing custom algorithmic trading software. Both tools have had significant "battle testing" in the financial space, with the former making up the predominant software stack for investment banking trading infrastructure and the latter being heavily used for quantitative trading research within investment funds.


Microsoft and MathWorks both provide extensive high quality documentation for their products. Further, the communities surrounding each tool are very large with active web forums for both. The software allows cohesive integration with multiple languages such as C++, C# and VB, as well as easy linkage to other Microsoft products such as the SQL Server database via LINQ. MatLab also has many plugins/libraries (some free, some commercial) for nearly any quantitative research domain.


There are also drawbacks. With either piece of software the costs are not insignificant for a lone trader (although Microsoft does provide entry-level version of Visual Studio for free). Microsoft tools "play well" with each other, but integrate less well with external code. Visual Studio must also be executed on Microsoft Windows, which is arguably far less performant than an equivalent Linux server which is optimally tuned.


MatLab also lacks a few key plugins such as a good wrapper around the Interactive Brokers API, one of the few brokers amenable to high-performance algorithmic trading. The main issue with proprietary products is the lack of availability of the source code. This means that if ultra performance is truly required, both of these tools will be far less attractive.


Open source tools have been industry grade for sometime. Much of the alternative asset space makes extensive use of open-source Linux, MySQL/PostgreSQL, Python, R, C++ and Java in high-performance production roles. However, they are far from restricted to this domain. Python and R, in particular, contain a wealth of extensive numerical libraries for performing nearly any type of data analysis imaginable, often at execution speeds comparable to compiled languages, with certain caveats.


The main benefit of using interpreted languages is the speed of development time. Python and R require far fewer lines of code (LOC) to achieve similar functionality, principally due to the extensive libraries. وعلاوة على ذلك، فإنها غالبا ما تسمح تطوير وحدة التحكم التفاعلية القائمة، والحد بسرعة من عملية التنمية التكرارية.


Given that time as a developer is extremely valuable, and execution speed often less so (unless in the HFT space), it is worth giving extensive consideration to an open source technology stack. Python and R possess significant development communities and are extremely well supported, due to their popularity. Documentation is excellent and bugs (at least for core libraries) remain scarce.


Open source tools often suffer from a lack of a dedicated commercial support contract and run optimally on systems with less-forgiving user interfaces. A typical Linux server (such as Ubuntu) will often be fully command-line oriented. In addition, Python and R can be slow for certain execution tasks. There are mechanisms for integrating with C++ in order to improve execution speeds, but it requires some experience in multi-language programming.


While proprietary software is not immune from dependency/versioning issues it is far less common to have to deal with incorrect library versions in such environments. أنظمة التشغيل مفتوحة المصدر مثل لينكس يمكن أن تكون أكثر صعوبة لإدارة.


I will venture my personal opinion here and state that I build all of my trading tools with open source technologies. In particular I use: Ubuntu, MySQL, Python, C++ and R. The maturity, community size, ability to "dig deep" if problems occur and lower total cost ownership (TCO) far outweigh the simplicity of proprietary GUIs and easier installations. Having said that, Microsoft Visual Studio (especially for C++) is a fantastic Integrated Development Environment (IDE) which I would also highly recommend.


Batteries Included?


The header of this section refers to the "out of the box" capabilities of the language - what libraries does it contain and how good are they? This is where mature languages have an advantage over newer variants. C++, Java and Python all now possess extensive libraries for network programming, HTTP, operating system interaction, GUIs, regular expressions (regex), iteration and basic algorithms.


C++ is famed for its Standard Template Library (STL) which contains a wealth of high performance data structures and algorithms "for free". Python is known for being able to communicate with nearly any other type of system/protocol (especially the web), mostly through its own standard library. R has a wealth of statistical and econometric tools built in, while MatLab is extremely optimised for any numerical linear algebra code (which can be found in portfolio optimisation and derivatives pricing, for instance).


Outside of the standard libraries, C++ makes use of the Boost library, which fills in the "missing parts" of the standard library. In fact, many parts of Boost made it into the TR1 standard and subsequently are available in the C++11 spec, including native support for lambda expressions and concurrency.


Python has the high performance NumPy/SciPy/Pandas data analysis library combination, which has gained widespread acceptance for algorithmic trading research. Further, high-performance plugins exist for access to the main relational databases, such as MySQL++ (MySQL/C++), JDBC (Java/MatLab), MySQLdb (MySQL/Python) and psychopg2 (PostgreSQL/Python). Python can even communicate with R via the RPy plugin!


An often overlooked aspect of a trading system while in the initial research and design stage is the connectivity to a broker API. Most APIs natively support C++ and Java, but some also support C# and Python, either directly or with community-provided wrapper code to the C++ APIs. In particular, Interactive Brokers can be connected to via the IBPy plugin. If high-performance is required, brokerages will support the FIX protocol.


استنتاج.


As is now evident, the choice of programming language(s) for an algorithmic trading system is not straightforward and requires deep thought. The main considerations are performance, ease of development, resiliency and testing, separation of concerns, familiarity, maintenance, source code availability, licensing costs and maturity of libraries.


فائدة الهندسة المعمارية المنفصلة هي أنه يسمح لللغات بأن تكون "موصولة" لمختلف جوانب كومة التداول، وعندما تتغير المتطلبات. A trading system is an evolving tool and it is likely that any language choices will evolve along with it.


مجرد بدء مع التداول الكمي؟


3 أسباب الاشتراك في قائمة البريد الإلكتروني كوانتستارت:


1. دروس التداول الكمي.


سوف تحصل على إمكانية الوصول الفوري إلى دورة مجانية 10-البريد الإلكتروني معبأة مع تلميحات ونصائح لمساعدتك على البدء في التداول الكمي!


2. جميع أحدث المحتوى.


كل أسبوع سوف نرسل لك التفاف جميع الأنشطة على كوانتستارت لذلك عليك أن لا يفوتون وظيفة مرة أخرى.


ريال مدريد، وقابلة للتنفيذ نصائح التداول الكمي مع أي هراء.


Welcome to the Trading Gurus!


The Trading Gurus create algorithmic trading systems.


Our systems are based upon an object-oriented framework that supports local and wide area networking of heterogeneous systems using Google protocol buffers and/or 0MQ. We also support a wide variety of market data/broker interfaces, including the FIX protocol.


We support Java, C#, C++ and Object Pascal.


We also support MultiCharts and NinjaTrader for those on a tight budget.


Shock news! We now even support "object-oriented" MetaTrader 4 build 600+ and MetaTrader 5 too!


If you have an unusual requirement such as getting FIX 4.2 talking to MT4 over a wide area network using Google protocol buffers and/or JSON over 0MQ then please do not hesitate to get in touch.


We have already implemented this unlikely sounding combination! If you are from the UK too, and you are interested in professional automated spreadbetting then you may well be interested in something similar.


Software Developer - Algorithmic High Frequency Trading Systems!


What You Will Be Doing.


What You Need for this Position.


- Capability to build heavy data driven software.


- Finance Trading Applications.


What's In It for You.


Applicants must be authorized to work in the U. S.


Preferred Skills.


Andrew Nguyen is recruiting for this position and the positions below.


CyberCoders, Inc is proud to be an Equal Opportunity Employer.


All qualified applicants will receive consideration for employment without regard to race, color, religion, sex, national origin, disability, protected veteran status, or any other characteristic protected by law.


Your Right to Work – In compliance with federal law, all persons hired will be required to verify identity and eligibility to work in the United States and to complete the required employment eligibility verification document form upon hire.

No comments:

Post a Comment