الفوركس تداول نظام الهندسة المعمارية


نظم التداول: تصميم النظام الخاص بك - الجزء 1 13 القسم السابق من هذا البرنامج التعليمي نظرت في العناصر التي تشكل نظام التداول وناقش مزايا وعيوب استخدام مثل هذا النظام في بيئة التداول الحية. في هذا القسم، نبني على تلك المعرفة من خلال دراسة الأسواق التي هي مناسبة بشكل خاص لتداول النظام. ثم سوف نلقي نظرة أكثر تعمقا على أنواع مختلفة من أنظمة التداول. التداول في أسواق األسواق المختلفة أسواق األسهم هي السوق األكثر شيوعا في التجارة، ال سيما بين المبتدئين. في هذه الساحة، اللاعبين الكبار مثل وارن بافيت وميريل لينش تهيمن، والقيم التقليدية واستراتيجيات النمو النمو هي إلى حد بعيد الأكثر شيوعا. ومع ذلك، فإن العديد من المؤسسات قد استثمرت كثيرا في تصميم نظم التجارة وتطويرها وتنفيذها. ينضم المستثمرون الأفراد إلى هذا الاتجاه، على الرغم من ببطء. في ما يلي بعض العوامل الرئيسية التي يجب أخذها في الاعتبار عند استخدام أنظمة التداول في أسواق الأسهم: 13 إن الكم الكبير من الأسهم المتاحة يسمح للمتداولين باختبار الأنظمة على العديد من أنواع الأسهم المختلفة - كل شيء من الأسهم المتقلبة للغاية دون وصفة طبية (أوتك) إلى رقائق غير متطايرة. فعالية أنظمة التداول يمكن أن تكون محدودة بسبب انخفاض السيولة في بعض الأسهم، وخاصة أوتك والورق ورقة القضايا. يمكن للجنة أن تأكل في الأرباح الناتجة عن الصفقات الناجحة، ويمكن أن تزيد الخسائر. غالبا ما تتكبد الأسهم المتداولة خارج البورصة والورق الورقي رسوم عمولات إضافية. والنظم التجارية الرئيسية المستخدمة هي تلك التي تبحث عن القيمة - أي النظم التي تستخدم معلمات مختلفة لتحديد ما إذا كان الأمن أقل من قيمتها مقارنة بأدائها السابق أو نظرائها أو السوق بشكل عام. أسواق الصرف الأجنبي سوق الصرف الأجنبي، أو النقد الأجنبي. هي أكبر وأكثر الأسواق سيولة في العالم. وتتجاوز حكومات العالم والبنوك والمؤسسات الكبيرة الاخرى تريليونات الدولارات فى سوق الفوركس كل يوم. تعتمد غالبية التجار المؤسساتيين في البورصة على أنظمة التداول. الشيء نفسه ينطبق على الأفراد في الفوركس، ولكن بعض التجارة على أساس التقارير الاقتصادية أو دفعات الفائدة. هنا بعض العوامل الرئيسية أن نأخذ في الاعتبار عند استخدام أنظمة التداول في سوق الفوركس: السيولة في هذا السوق - نظرا لحجم ضخم - يجعل أنظمة التداول أكثر دقة وفعالية. لا توجد عمولات في هذا السوق، ينتشر فقط. لذلك، أسهل بكثير لجعل العديد من المعاملات دون زيادة التكاليف. وبالمقارنة مع كمية الأسهم أو السلع المتاحة، فإن عدد العملات المتاحة للتجارة محدود. ولكن بسبب توفر أزواج العملات الغريبة - أي العملات من البلدان الصغيرة - فإن النطاق من حيث التقلب ليس بالضرورة محدودا. أنظمة التداول الرئيسية المستخدمة في الفوركس هي تلك التي تتبع الاتجاهات (قول مأثور في السوق هو الاتجاه هو صديقك)، أو الأنظمة التي تشتري أو تبيع على هروب. وذلك لأن المؤشرات الاقتصادية غالبا ما تسبب تحركات أسعار كبيرة في وقت واحد. العقود الآجلة للأسهم، الفوركس، والأسواق السلع كلها تقدم تداول العقود الآجلة. هذا هو وسيلة شعبية لتجارة النظام بسبب ارتفاع كمية من الرافعة المالية المتاحة وزيادة السيولة والتقلب. ومع ذلك، يمكن لهذه العوامل خفض كلتا الطريقتين: فإنها يمكن إما تضخيم المكاسب الخاصة بك أو تضخيم الخسائر الخاصة بك. ولهذا السبب، فإن استخدام العقود الآجلة يحتفظ عادة بتجار النظام الفردي والمؤسسي المتقدمين. وذلك لأن أنظمة التداول قادرة على الاستفادة من سوق العقود الآجلة تتطلب التخصيص أكبر بكثير، واستخدام مؤشرات أكثر تقدما وتستغرق وقتا أطول لتطوير. لذا، ما هو أفضل ما يصل إلى المستثمر الفردي أن تقرر أي السوق هو الأنسب لتداول النظام - لكل منها مزاياه وعيوبه. معظم الناس أكثر دراية بأسواق الأسهم، وهذا الألفة يجعل تطوير نظام التداول أسهل. ومع ذلك، يعتقد عادة أن الفوركس هو منصة متفوقة لتشغيل أنظمة التداول - وخاصة بين التجار الأكثر خبرة. وعلاوة على ذلك، إذا قرر المتداول الاستفادة من زيادة الرافعة المالية والتقلب، فإن البديل الآجل مفتوح دائما. في نهاية المطاف، فإن الخيار يكمن في أيدي المطور النظام. أنماط أنظمة التداول تريند-فولوينغ سيستمز الأسلوب الأكثر شيوعا من نظام التداول هو الاتجاه - نظام المتابعة. وفي شكله الأساسي، ينتظر هذا النظام ببساطة حركة سعرية كبيرة، ثم يشتري أو يبيع في هذا الاتجاه. هذا النوع من البنوك النظام على أمل أن تحركات الأسعار هذه سوف تحافظ على الاتجاه. موفينغ أفيراج سيستمز تستخدم بشكل متكرر في التحليل الفني. المتوسط ​​المتحرك هو مؤشر يبين ببساطة متوسط ​​سعر السهم على مدى فترة من الزمن. ويستمد جوهر الاتجاهات من هذا القياس. الطريقة الأكثر شيوعا لتحديد الدخول والخروج هي كروس أوفر. والمنطق وراء ذلك بسيط: حيث يتم تحديد اتجاه جديد عندما ينخفض ​​السعر فوق أو أدنى من متوسط ​​السعر التاريخي (الاتجاه). هنا هو الرسم البياني الذي يرسم كل من السعر (الخط الأزرق) و 20 يوما ما (الخط الأحمر) من عب: أنظمة اندلاع المفهوم الأساسي وراء هذا النوع من النظام مشابه لمفهوم نظام المتوسط ​​المتحرك. والفكرة هي أنه عندما يتم إنشاء ارتفاع جديد أو منخفض جديد، فإن حركة السعر من المرجح أن تستمر في اتجاه الاختراق. أحد المؤشرات التي يمكن استخدامها في تحديد الهروب هو تراكب البولينجر باند بسيط. تظهر البولنجر باند متوسطات الأسعار المرتفعة والمنخفضة، وتحدث الانفجارات عندما يلتقي السعر بحافة العصابات. هنا الرسم البياني الذي يخطط السعر (الخط الأزرق) و بولينجر باندز (خطوط رمادية) من ميكروسوفت: عيوب أنظمة تريند التالية: اتخاذ القرار التجريبي المطلوبة - عند تحديد الاتجاهات، هناك دائما عنصر تجريبي للنظر: مدة الاتجاه التاريخي. على سبيل المثال، يمكن أن يكون المتوسط ​​المتحرك خلال ال 20 يوما الماضية أو خلال السنوات الخمس الماضية، لذلك يجب على المطور تحديد أي واحد هو الأفضل للنظام. ومن العوامل الأخرى التي يتعين تحديدها المتوسطات العالية والمنخفضة في أنظمة الاختراق. الطبيعة المتخلفة - المتوسطات المتحركة وأنظمة الاختراق سوف تكون دائما متخلفة. وبعبارة أخرى، فإنها لا يمكن أبدا ضرب أعلى أو أسفل بالضبط الاتجاه. وهذا يؤدي حتما إلى مصادرة الأرباح المحتملة، التي يمكن أن تكون كبيرة في بعض الأحيان. تأثير السياط - من بين قوى السوق التي تضر نجاح الأنظمة التالية الاتجاه، وهذا هو واحد من أكثر شيوعا. ويحدث التأثير السطحي عندما يولد المتوسط ​​المتحرك إشارة خاطئة - أي عندما ينخفض ​​المتوسط ​​إلى المدى، ثم ينعكس فجأة الاتجاه. ويمكن أن يؤدي ذلك إلى خسائر هائلة ما لم يتم استخدام أساليب فعالة لوقف الخسائر وتقنيات إدارة المخاطر. الأسواق الجانبية - النظم التي تتبع الاتجاه هي، بطبيعة الحال، قادرة على كسب المال فقط في الأسواق التي في الواقع الاتجاه. ومع ذلك، تتحرك الأسواق أيضا جانبيا. البقاء ضمن نطاق معين لفترة طويلة من الزمن. قد يحدث تقلب شديد في بعض الأحيان، قد تواجه الأنظمة التي تتبع الاتجاه بعض التقلب الشديد، ولكن يجب على التاجر التمسك بنظامه. إن عدم القدرة على القيام بذلك سيؤدي إلى فشل مؤكد. كونترترند سيستمز في الأساس، فإن الهدف مع نظام كونترترند هو شراء في أدنى مستوى منخفض وبيع على أعلى مستوى عال. والفرق الرئيسي بين هذا والنظام الذي يتبع الاتجاه هو أن نظام الاتجاه المعاكس ليس تصحيحا ذاتيا. وبعبارة أخرى، ليس هناك وقت محدد للخروج من المراكز، وهذا يؤدي إلى احتمال الهبوط غير محدود. أنواع أنظمة كونترترند تعتبر العديد من األنواع المختلفة من األنظمة أنظمة عكسية. والفكرة هنا هي لشراء عندما يبدأ الزخم في اتجاه واحد يتلاشى. وغالبا ما يتم حساب هذا باستخدام مؤشرات التذبذب. على سبيل المثال، يمكن إنشاء إشارة عند مؤشر ستوكاستيك أو مؤشرات القوة النسبية الأخرى تندرج تحت نقاط معينة. هناك أنواع أخرى من أنظمة التداول المعاكس، ولكن كل منهم يشتركون في نفس الهدف الأساسي - لشراء منخفضة وبيع عالية. عيوب كونترترند الأنظمة التالية: E مبيريكال ديسيسيون-ماكينغ ريكيرد - على سبيل المثال، أحد العوامل التي يجب على مطور النظام اتخاذ قرار بشأنها هي النقاط التي تتلاشى فيها مؤشرات القوة النسبية. قد يحدث تقلب شديد - قد تواجه هذه الأنظمة أيضا بعض التقلب الشديد، وعدم القدرة على التمسك بالنظام على الرغم من هذا التقلب سوف يؤدي إلى فشل مؤكد. غير محدود الجانب السلبي - كما ذكر سابقا، هناك احتمال الهبوط غير محدود لأن النظام ليس التصحيح الذاتي (ليس هناك وقت محدد للخروج من المواقف). خاتمة الأسواق الرئيسية التي هي أنظمة التداول المناسبة هي الأسهم، الفوركس والأسواق الآجلة. كل من هذه الأسواق له مزاياه وعيوبه. النوعان الرئيسيان لنظم التداول هما نظامي الاتجاه والاتجاه المعاكس. وعلى الرغم من خلافاتها، فإن كلا النوعين من الأنظمة، في مراحلها التنموية، يتطلبان اتخاذ قرار تجريبي من جانب المطور. كما أن هذه الأنظمة تخضع لتقلبات شديدة وقد يتطلب ذلك بعض القدرة على التحمل - من الضروري أن يلتزم تاجر النظام بنظامه أثناء هذه الأوقات. في الدفعة التالية، نلقي نظرة فاحصة على كيفية تصميم نظام التداول ومناقشة بعض البرامج التي يستخدمها تجار النظام لجعل حياتهم أسهل. أنظمة التداول: تصميم النظام الخاص بك - الجزء 2 التجارة الطابق الهندسة المعمارية تجارة الطابق الهندسة المعمارية التنفيذي نظرة عامة زيادة المنافسة، وارتفاع حجم بيانات السوق، والمطالب التنظيمية الجديدة هي بعض القوى الدافعة وراء التغييرات الصناعة. تحاول الشركات الحفاظ على قدرتها التنافسية من خلال تغيير استراتيجياتها التجارية باستمرار وزيادة سرعة التداول. يجب أن تتضمن الهندسة المعمارية القابلة للحياة أحدث التقنيات من مجالات الشبكات والتطبيقات. يجب أن تكون وحدات لتوفير مسار يمكن إدارته لتطوير كل مكون مع الحد الأدنى من تعطيل للنظام العام. ولذلك فإن العمارة المقترحة من قبل هذه الورقة تستند إلى إطار الخدمات. نحن نفحص الخدمات مثل الترا-- منخفضة الكمون الرسائل، رصد الكمون، البث المتعدد، والحوسبة، والتخزين والبيانات والتطبيق الظاهري، ومرونة التداول، والتداول التنقل، والعميل رقيقة. يجب أن يتم بناء الحل للمتطلبات المعقدة من منصة التداول من الجيل التالي مع عقلية شاملة، عبور حدود الصوامع التقليدية مثل الأعمال والتكنولوجيا أو التطبيقات والشبكات. الهدف الرئيسي لهذه الوثيقة هو توفير مبادئ توجيهية لبناء منصة تداول الكمون منخفضة للغاية مع تحسين الإنتاجية الخام ومعدل الرسالة لكل من بيانات السوق وأوامر التداول فيكس. لتحقيق ذلك، نقترح تقنيات الحد من الكمون التالية: سرعة عالية بين كونيكتينفينيباند أو 10 غيغابت في الثانية الاتصال لمجموعة التداول عالية السرعة ناقل الرسائل تسريع التطبيق عبر ردما دون تطبيق إعادة رمز في الوقت الحقيقي رصد الكمون وإعادة توجيه حركة المرور إلى المسار مع الحد الأدنى من الكمون اتجاهات الصناعة والتحديات يجب على الجيل التالي من أبنية التداول للرد على الطلبات المتزايدة للسرعة والحجم والكفاءة. على سبيل المثال، من المتوقع أن يتضاعف حجم بيانات سوق الخيارات بعد إدخال خيارات التداول بيني في عام 2007. وهناك أيضا متطلبات تنظيمية لأفضل تنفيذ، والتي تتطلب معالجة الأسعار التحديثات بالمعدلات التي تقترب 1M مسغسيك. للتبادلات. كما أنها تتطلب رؤية في نضارة البيانات وإثبات أن العميل حصلت على أفضل تنفيذ ممكن. على المدى القصير، سرعة التداول والابتكار هي عوامل التفريق الرئيسية. يتم التعامل مع عدد متزايد من الصفقات من خلال تطبيقات التداول الحسابية وضعت في أقرب وقت ممكن إلى مكان تنفيذ التجارة. ومن التحديات التي تواجهها هذه المحركات المتداولة في البورصة أن تزيد من حجم الزيادة من خلال إصدار الأوامر فقط لإلغائها وإعادة إرسالها. سبب هذا السلوك هو عدم وجود رؤية في أي مكان يقدم أفضل تنفيذ. التاجر البشري هو الآن مهندس كوفينانسيال، كوت كوانتكوت (المحلل الكمي) مع مهارات البرمجة، الذين يمكن ضبط نماذج التداول على الطاير. وتطور الشرکات أدوات مالیة جدیدة مثل المشتقات المناخیة أو الصفقات الصناعیة عبر الأصول، وتحتاج إلی نشر التطبیقات الجدیدة بسرعة وبطریقة قابلة للتطویر. على المدى الطويل، ينبغي أن يأتي التمايز التنافسي من التحليل وليس المعرفة فقط. تجار نجمة الغد يتحملون المخاطر، ويحققون رؤية العميل الحقيقية، ويضربون باستمرار السوق (المصدر عب: ووو-935.ibmservicesusimcpdfge510-6270-trader. pdf). وقد كانت مرونة الأعمال أحد الشواغل الرئيسية للشركات التجارية منذ 11 سبتمبر 2001. وتتراوح الحلول في هذا المجال من مراكز بيانات زائدة تقع في مناطق جغرافية مختلفة ومتصلة بأماكن تجارية متعددة لحلول التاجر الافتراضية التي تقدم لمتداولي الطاقة معظم وظائف أرضية التداول في مكان بعيد. صناعة الخدمات المالية هي واحدة من الأكثر تطلبا من حيث متطلبات تكنولوجيا المعلومات. وتشهد هذه الصناعة تحولا معماريا نحو العمارة الموجهة نحو الخدمات (سوا)، وخدمات الويب، والمحاكاة الافتراضية لموارد تكنولوجيا المعلومات. سوا يستفيد من الزيادة في سرعة الشبكة لتمكين ديناميكية ملزمة والافتراضية مكونات البرمجيات. وهذا يسمح بإنشاء تطبيقات جديدة دون أن تفقد الاستثمار في النظم والبنية التحتية القائمة. هذا المفهوم لديه القدرة على إحداث ثورة في طريقة الاندماج، مما يتيح تخفيضات كبيرة في تعقيد وتكلفة هذا التكامل (gigaspacesdownloadMerrilLynchGigaSpacesWP. pdf). وهناك اتجاه آخر يتمثل في توطيد الخوادم في مزارع ملقمات مراكز البيانات، في حين أن مكاتب التاجر لديها ملحقات كفم وعملاء رقيقة جدا (مثل سونراي و هب بليد سولوتيونس). تتيح شبكات منطقة المترو عالية السرعة لبيانات السوق أن تكون متعددة الإرسال بين مواقع مختلفة، مما يتيح التمثيل الافتراضي لقاعة التداول. الهندسة المعمارية عالية المستوى الشكل 1 يصور بنية عالية المستوى للبيئة التجارية. يقع مصنع السهم ومحركات التداول الخوارزمية في مجموعة التداول عالية الأداء في مركز بيانات الشركات أو في البورصة. يقع التجار البشر في منطقة تطبيقات المستخدم النهائي. وظيفيا هناك نوعان من مكونات التطبيق في بيئة تجارية المؤسسة والناشرين والمشتركين. يوفر ناقل الرسائل مسار الاتصال بين الناشرين والمشتركين. هناك نوعان من حركة المرور الخاصة ببيئة تجارية: بيانات السوقحجز معلومات التسعير للأدوات المالية والأخبار والمعلومات ذات القيمة المضافة الأخرى مثل التحليلات. وهو أحادي الاتجاه والكمون جدا حساسة، تسليم عادة عبر أودب الإرسال المتعدد. ويقاس في أوبداتيسيك. و مبس. وتتدفق بيانات السوق من تغذية واحدة أو عدة خلاصات خارجية، تأتي من مزودي بيانات السوق مثل البورصات ومجمعات البيانات و إنز. كل مزود لديه شكل بيانات السوق الخاصة بها. يتم تلقي البيانات من قبل معالجات الأعلاف، والتطبيقات المتخصصة التي تطبيع وتنظيف البيانات ومن ثم إرسالها إلى المستهلكين البيانات، مثل محركات التسعير، وتطبيقات التداول حسابي، أو التجار البشر. كما تقوم الشركات البيعية بإرسال بيانات السوق إلى عملائها وشركات الشراء مثل صناديق الاستثمار وصناديق التحوط ومديري الأصول الأخرى. وقد تختار بعض شركات الشراء الحصول على تغذية مباشرة من البورصات، مما يقلل من الكمون. الشكل 1 معمارية التداول لجانب الشراء شركة الجانب الجانبي لا يوجد معيار صناعي لتنسيقات بيانات السوق. كل تبادل لها شكل الملكية. مزودي المحتوى المالي مثل رويترز وبلومبرغ تجميع مصادر مختلفة من بيانات السوق، وتطبيعه، وإضافة الأخبار أو التحليلات. ومن الأمثلة على الأعلاف الموحدة هي ردف (خلاصة بيانات رويترز)، و روف (ريوترز وير فورمات)، وبيانات بلومبرغ للخدمات المهنية. ولتقديم بيانات أقل عن سوق الكمون، قام كل من البائعين بإصدار خلاصات بيانات السوق في الوقت الحقيقي والتي تكون أقل معالجة وذات تحليلات أقل: بلومبرغ B-بايبويث B-بايب، تقوم بلومبرغ بتزوير بيانات سوقها من منصة التوزيع الخاصة بها نظرا لأن محطة بلومبرغ غير مطلوب للحصول على B - الأنابيب. وقد أعلنت وومبات ورويترز أعلاف معالجات دعم B - الأنابيب. قد تقرر الشركة تلقي الخلاصات مباشرة من التبادل لتقليل وقت الاستجابة. يمكن أن تكون المكاسب في سرعة الإرسال بين 150 ميلي ثانية إلى 500 ميلي ثانية. هذه الأعلاف هي أكثر تعقيدا وأكثر تكلفة والشركة لديها لبناء والحفاظ على النباتات الخاصة بهم شريط (financetechfeaturedshowArticle. jhtmlarticleID60404306). أوامر التداول هذا النوع من حركة المرور يحمل الصفقات الفعلية. فمن ثنائية الاتجاه والكمون جدا حساسة. ويقاس في مساجيسيك. و مبس. أوامر تنشأ من جانب شراء أو بيع الجانب شركة ويتم إرسالها إلى أماكن التداول مثل إكسهانج أو إن للتنفيذ. الشكل الأكثر شيوعا لنقل النظام هو فيكس (المعلومات المالية eXchangefixprotocol. org). وتسمى التطبيقات التي تعالج رسائل فيكس محركات فيكس وهي واجهة مع أنظمة إدارة النظام (أومز). يسمى التحسين إلى فيكس فاست (فيكس أدابتد فور سترامينغ)، والذي يستخدم مخطط ضغط لتقليل طول الرسالة، وفي الواقع، تقليل زمن الاستجابة. ويستهدف فاست أكثر إلى تسليم بيانات السوق ولها القدرة على أن تصبح معيارا. فاست يمكن أن تستخدم أيضا كمخطط ضغط لتنسيقات بيانات السوق الملكية. للحد من وقت الاستجابة، قد تختار الشركات إنشاء الوصول المباشر إلى الأسواق (دما). دما هي العملية الآلية لتوجيه نظام الأوراق المالية مباشرة إلى مكان التنفيذ، وبالتالي تجنب تدخل من طرف ثالث (towergroupresearchcontentglossary. jsppage1ampglossaryId383). دما يتطلب اتصال مباشر إلى مكان التنفيذ. ناقل الرسائل هو برامج الوسيطة من البائعين مثل تيبكو، 29West، رويترز رمدس، أو منصة مفتوحة المصدر مثل أمكب. يستخدم ناقل الرسائل آلية موثوقة لتقديم الرسائل. ويمكن أن يتم النقل عبر تكبيب (تيبكومز، 29West، رمدس، و أمكب) أو أودبمولتيكاست (تيبكورف، 29West، و رمدس). ويتمثل أحد المفاهيم المهمة في توزيع الرسائل في تدفق البيانات، وهو عبارة عن مجموعة فرعية من بيانات السوق تحددها معايير مثل رمز المؤشر أو الصناعة أو سلة معينة من الأدوات المالية. ينضم المشتركون إلى مجموعات الموضوعات التي تم تعيينها لموضوع واحد أو عدة مواضيع فرعية من أجل الحصول على المعلومات ذات الصلة فقط. في الماضي، تلقى جميع التجار جميع بيانات السوق. في الأحجام الحالية من حركة المرور، وهذا سيكون دون المستوى الأمثل. تلعب الشبكة دورا حاسما في البيئة التجارية. يتم نقل بيانات السوق إلى الطابق التجاري حيث يقع التجار البشري عبر شبكة عالية السرعة الحرم الجامعي أو مترو منطقة. كما أن توافرها العالي ووقت الاستجابة المنخفض، فضلا عن الإنتاجية العالية، هما أهم المقاييس. بيئة التداول عالية الأداء لديها معظم مكوناتها في مركز خدمة مركز البيانات. لتقليل وقت الاستجابة، تحتاج محركات التداول الخوارزمية إلى تحديد موقعها بالقرب من معالجات التغذية ومحركات فيكس وأنظمة إدارة الطلبات. نموذج النشر البديل لديه أنظمة التداول الحسابية الموجودة في تبادل أو مزود خدمة مع اتصال سريع لتبادل متعددة. نماذج النشر هناك نوعان من نماذج النشر لمنصة تداول عالية الأداء. قد تختار الشركات أن يكون لديها مزيج من اثنين: مركز البيانات للشركة التجارية (الشكل 2) هذا هو النموذج التقليدي، حيث يتم تطوير منصة التداول كاملة والحفاظ عليها من قبل الشركة مع وصلات الاتصال إلى جميع أماكن التداول. الكمون يختلف مع سرعة الروابط وعدد من القفزات بين الشركة والأماكن. الشكل 2 نموذج النشر التقليدي موقع مشترك في مكان التداول (التبادل، ومقدمي الخدمات المالية (فسب)) (الشكل 3) تقوم الشركة التجارية بنشر منصة التداول الآلي في أقرب وقت ممكن إلى أماكن التنفيذ لتقليل وقت الاستجابة. الشکل 3 نموذج النشر المستھدف الخدمات التجاریة الموجھة نحو الخدمات نحن نقترح إطارا موجھا نحو الخدمات لبناء ھیکل التداول القادم من الجیل. ويوفر هذا النهج إطارا مفاهيميا ومسارا للتنفيذ يستند إلى نمطية التقليل من التبعيات وتقليلها إلى أدنى حد. يوفر هذا الإطار للشركات منهجية: تقييم حالتها الحالية من حيث الخدمات تحديد أولويات الخدمات على أساس قيمتها إلى الأعمال التجارية تطوير منصة التداول إلى الدولة المطلوبة باستخدام نهج وحدات تعتمد بنية التداول عالية الأداء على الخدمات التالية، كما التي يحددها إطار معمارية الخدمات الممثلة في الشكل 4. الشكل 4 إطار معمارية الخدمة لخدمة عالية الأداء التراسل التراخي التراسل خدمة يتم توفير هذه الخدمة من قبل حافلة الرسائل، وهو نظام البرمجيات التي تحل مشكلة ربط العديد من ل - العديد من التطبيقات. يتكون النظام من: مجموعة من مخططات الرسائل المحددة مسبقا مجموعة من رسائل الأوامر الشائعة بنية أساسية للتطبيق مشتركة لإرسال الرسائل إلى المستلمين. يمكن أن تستند البنية التحتية المشتركة إلى وسيط رسالة أو على نموذج نشر الاشتراك. المتطلبات الأساسية لحافلة الرسائل من الجيل التالي هي (المصدر 29West): أقل كمون ممكن (على سبيل المثال أقل من 100 ميكروثانية) الاستقرار تحت الحمل الثقيل (على سبيل المثال أكثر من 1.4 مليون مسغسيك) التحكم والمرونة (التحكم في معدل النقل القابل للضبط) هناك هي الجهود المبذولة في هذه الصناعة لتوحيد ناقل الرسائل. بروتوكول المتقدم قائمة انتظار الرسائل (أمكب) هو مثال على معيار مفتوح بطل من قبل J. P. مورغان تشيس وبدعم من مجموعة من البائعين مثل سيسكو، إنفوي تكنولوجيز، ريد هات، تويست ابتكارات العملية، ايونا، 29West، و إماتيكس. اثنين من الأهداف الرئيسية هي توفير مسار أكثر بساطة إلى قابلية التشغيل للتطبيقات المكتوبة على منصات مختلفة ونمطية بحيث الوسيطة يمكن أن تتطور بسهولة. وبعبارات عامة جدا، يكون خادم أمكب مشابها لخادم البريد الإلكتروني حيث يعمل كل تبادل كعميل لنقل الرسائل وكل طابور رسالة كعلبة بريد. تحدد الارتباطات جداول التوجيه في كل عامل نقل. يرسل الناشرون رسائل إلى وكلاء النقل الفرديين، ثم يقومون بتوجيه الرسائل إلى علب بريد. المستهلكون يأخذون رسائل من علب البريد، مما يخلق نموذجا قويا ومرنا بسيطا (المصدر: amqp. orgtikiwikitiki-index. phppageOpenApproachWhyAMQP). خدمة مراقبة الكمون المتطلبات الرئيسية لهذه الخدمة هي: دقيقة ملي ثانية من القياسات الرؤية في الوقت الحقيقي تقريبا دون إضافة الكمون لحركة التداول القدرة على التمييز بين الكمون تجهيز التطبيق من الكمون عبور الشبكة القدرة على التعامل مع معدلات رسالة عالية توفير واجهة برنامجية ل تطبيقات التداول لتلقي البيانات الكمون، مما يتيح محركات التداول خوارزمية للتكيف مع الظروف المتغيرة ربط الأحداث الشبكة مع أحداث التطبيق لأغراض استكشاف الأخطاء وإصلاحها يمكن تعريف الكمون على أنه الفاصل الزمني بين عندما يتم إرسال أمر التجارة وعندما يتم الاعتراف نفس الأمر وتصرفت من قبل الطرف المتلقي. معالجة مشكلة الكمون هي مشكلة معقدة، تتطلب نهجا شاملا يحدد جميع مصادر الكمون وينطبق تقنيات مختلفة في طبقات مختلفة من النظام. الشكل 5 يصور مجموعة متنوعة من المكونات التي يمكن أن تقدم الكمون في كل طبقة من كومة أوسي. كما أنه يرسم كل مصدر للكامون مع حل ممكن وحل رصد. هذا النهج الطبقات يمكن أن تعطي الشركات طريقة أكثر تنظيما للهجوم على قضية الكمون، حيث يمكن اعتبار كل مكون على أنها خدمة ومعاملتها باستمرار في جميع أنحاء الشركة. يمكن أن يكون الحفاظ على قياس دقيق للحالة الديناميكية لهذه الفترة الزمنية عبر الطرق والوجهات البديلة مساعدة كبيرة في القرارات التجارية التكتيكية. القدرة على تحديد الموقع الدقيق للتأخير، سواء في شبكة العملاء حافة، مركز المعالجة المركزية، أو مستوى تطبيق الصفقة، يحدد بشكل كبير قدرة مقدمي الخدمات لتلبية الاتفاقات على مستوى الخدمات التجارية (سلا). وفيما يتعلق بأشكال الشراء والبيع، وكذلك لمشتركي بيانات السوق، فإن التحديد السريع للعقبات وإزالتها يترجم مباشرة إلى فرص وفرص تجارية معززة. الشكل 5 معمارية إدارة وقت الاستجابة أدوات مراقبة سيسكو منخفضة الكمون تعمل أدوات المراقبة الشبكية التقليدية مع دقائق أو ثواني دقيقة. تتطلب منصات التداول من الجيل التالي، وخاصة تلك التي تدعم التداول الخوارزمي، تأخيرات أقل من 5 مللي ثانية ومستويات منخفضة للغاية من فقدان الحزمة. على شبكة جيجابت لان، يمكن أن يسبب ميكروبرست 100 مللي ثانية 10000 المعاملات إلى أن تضيع أو تأخر بشكل مفرط. تقدم شركة سيسكو لعملائها مجموعة من الأدوات لقياس زمن الاستجابة في بيئة تجارية: مدير جودة عرض النطاق الترددي (بم) من شركة كورفيل (سوم أون أون-باسد فينانسيال سيرفيسز كمنسي مونيتورينغ سولوتيون (فسمز) عرض النطاق الترددي مدير الجودة عرض النطاق الترددي مدير الجودة (بم) 4.0 هو وهو الجيل التالي من منتجات إدارة أداء التطبيقات الشبكية التي تمكن العملاء من مراقبة وتوفير شبكتها للمستويات التي تسيطر عليها من الكمون وفقدان الأداء. في حين أن بم لا يستهدف حصرا شبكات التداول، الرؤية ميكروثانية جنبا إلى جنب مع ميزات توفير عرض النطاق الترددي ذكي يجعلها مثالية لهذه البيئات تطلبا. سيسكو بم 4.0 تنفذ مجموعة واسعة من براءات الاختراع وبراءات الاختراع في انتظار تحليل حركة المرور وتقنيات تحليل الشبكة التي تعطي للمستخدم رؤية لم يسبق لها مثيل وفهم كيفية تحسين الشبكة لأقصى قدر من الأداء التطبيق. ويدعم سيسكو بم الآن على عائلة المنتج من سيسكو تطبيق نشر المحرك (إيد). إن عائلة منتج سيسكو أد هي المنصة المفضلة لتطبيقات إدارة شبكة سيسكو. مزايا بم سيسكو الرؤية الصغرى بم هو القدرة على كشف وقياس وتحليل زمن الاستجابة، غضب، وفقدان أحداث حركة المرور وصولا إلى مستويات ميكروثانية من دقة مع كل حزمة القرار. وهذا يمكن سيسكو بم من الكشف عن تأثير أحداث حركة المرور وتحديدها على وقت استجابة الشبكة والارتعاش والخسارة. ومن الأمور الحاسمة بالنسبة لبيئات التداول أن بسم يمكن أن يدعم قياسات الكمون والخسارة والارتعاش في اتجاه واحد لكل من حركة بروتوكول الإنترنت (تكب) و أودب (الإرسال المتعدد). وهذا يعني أنه يقدم تقارير بسلاسة لكل من بيانات حركة المرور وبيانات السوق. بم يسمح للمستخدم لتحديد مجموعة شاملة من العتبات (ضد النشاط ميكروبورست، الكمون، خسارة، غضب، والاستخدام، وما إلى ذلك) على جميع الواجهات. ثم بم قم بتشغيل الخلفية المتداول التقاط الحزمة. عند حدوث انتهاك عتبة أو حدث آخر من تدهور الأداء المحتمل، فإنه يؤدي سيسكو بم لتخزين التقاط الحزمة إلى القرص لتحليلها لاحقا. وهذا يتيح للمستعمل أن يدرس بتفصيل كامل حركة التطبيقات التي تأثرت بانحطاط الأداء (كوتدكوت) والحركة التي تسببت في تدهور الأداء (كوثبولبريتسكوت). وهذا يمكن أن يقلل كثيرا من الوقت الذي يقضيه تشخيص وحل مشكلات أداء الشبكة. بم هو أيضا قادرة على تقديم عرض النطاق الترددي مفصل وجودة الخدمة (كوس) توصيات توفير السياسة، والتي يمكن للمستخدم تطبيق مباشرة لتحقيق أداء الشبكة المطلوب. قياسات بم تم توضيحها لفهم الفرق بين بعض تقنيات القياس التقليدية والرؤية التي يوفرها بم، يمكننا أن ننظر إلى بعض الرسوم البيانية المقارنة. في المجموعة الأولى من الرسوم البيانية (الشكل 6 والشكل 7)، ونحن نرى الفرق بين الكمون يقاس بسمس السلبية مراقبة جودة الشبكة (بنم) والكمون يقاس عن طريق حقن حزم بينغ كل ثانية واحدة في تيار حركة المرور. في الشكل 6. نرى الكمون ذكرت من قبل 1 إيمب حزم بينغ إيمب لحركة مرور الشبكة الحقيقية (يتم تقسيمه إلى 2 لإعطاء تقدير للتأخير في اتجاه واحد). فإنه يدل على تأخير مريح أقل من حوالي 5ms تقريبا في كل وقت. الشكل 6 زمن الاستجابة المبلغ عنه بواسطة إيمب بينغ الحزم 1-الثانية لحركة الشبكة الحقيقية في الشكل 7. ونحن نرى الكمون التي أبلغ عنها بنم لنفس حركة المرور في نفس الوقت. هنا نرى أنه من خلال قياس الكمون في اتجاه واحد من حزم التطبيق الفعلي، نحصل على صورة مختلفة جذريا. هنا ينظر إلى الكمون أن تحوم حوالي 20 مللي ثانية، مع انفجارات في بعض الأحيان أعلى بكثير. التفسير هو أن بينغ يرسل الحزم فقط كل ثانية، فإنه مفقود تماما معظم الكمون حركة المرور التطبيق. وفي الواقع، تشير نتائج بينغ عادة إلى تأخر الانتشار ذهابا وإيابا بدلا من تأخر التطبيق الفعلي عبر الشبكة. الشكل 7 زمن الاستجابة المبلغ عنه من قبل الشبكة الوطنية لإدارة الحركة في حركة المرور في الشبكة الحقيقية في المثال الثاني (الشكل 8)، نرى الفرق في تحميل الوصلة أو مستويات التشبع المبلغ عنها بين عرض متوسط ​​قدره 5 دقائق وعرض 5 ميكروبورست (يمكن أن يقدم بم تقارير عن الميكروبورستات لأسفل إلى حوالي 10-100 دقة نانوسيكوند). ويظهر الخط الأخضر متوسط ​​الانتفاع بمتوسط ​​5 دقائق يكون منخفضا، وربما يصل إلى 5 ميغابتات. يظهر مؤامرة زرقاء داكنة 5ms نشاط الميكروبورست تصل بين 75 ميغابت و 100 ميغابت، وسرعة لان بشكل فعال. بقم يظهر هذا المستوى من الدقة لجميع التطبيقات، كما أنه يعطي قواعد واضحة للتمكين لتمكين المستخدم من السيطرة على أو تحييد هذه ميكروبورستس. الشكل 8 الفرق في الوصلة المبلغ عنها التحميل بين عرض متوسط ​​لمدة 5 دقائق وعرض ميكروبرست بمس 5 مللي ثانية نشر بم في شبكة التداول يبين الشكل 9 نشر بم النموذجي في شبكة تجارية. الشكل 9 نموذجي نشر بم في شبكة تداول يمكن بعد ذلك استخدام بم للإجابة على هذه الأنواع من الأسئلة: هل أي من وصلات جيجابت لان الأساسية مشبعة لأكثر من x ميلي ثانية هل هذا يسبب خسارة الروابط التي سوف تستفيد أكثر من الترقية إلى إيثيرشانل أو 10 جيجابت سرعات ما حركة المرور التطبيق يسبب تشبع بلدي 1 جيجابت الروابط هي أي من بيانات السوق تعاني من خسارة نهاية إلى نهاية كم كمون إضافي لا تجربة مركز البيانات تجاوز الفشل هل هذا الرابط الحجم بشكل صحيح للتعامل مع ميكروبورستس هل التجار الحصول على تحديثات الكمون المنخفض من طبقة توزيع البيانات في السوق هل يرون أي تأخير أكبر من X ميلي ثانية سيكون قادرا على الإجابة على هذه الأسئلة ببساطة وفعالية يوفر الوقت والمال في إدارة شبكة التداول. بم هو أداة أساسية للحصول على وضوح في بيانات السوق وبيئات التداول. وهو يوفر قياسات الكمون الحبيبية من طرف إلى طرف في البنى التحتية المعقدة التي تشهد حركة بيانات كبيرة الحجم. الكشف الفعال ميكروبورستس في مستويات ميلي ثانية واحدة وتلقي تحليل الخبراء على حدث معين لا تقدر بثمن للمهندسين المعماريين الطابق التجاري. وتوفر توصيات توفير النطاق الترددي الذكي، مثل التحجيم وتحليل ما إذا كان، مرونة أكبر للاستجابة لظروف السوق المتقلبة. ومع استمرار انفجار التداول الخوارزمي وزيادة معدلات الرسائل، يوفر بم، مقترنا بأداة جودة الخدمة، القدرة على تنفيذ سياسات جودة الخدمة التي يمكن أن تحمي تطبيقات التداول الحاسمة. سيسكو فينانسيال سيرفيسز اتقان مراقبة الحلول تعاونت سيسكو و ترادينغ ميتريكس على حلول رصد الكمون لتدفق النظام فيكس ومراقبة بيانات السوق. تعد تقنية سيسكو أون الأساس لفئة جديدة من المنتجات والحلول المضمنة في الشبكة والتي تساعد على دمج الشبكات الذكية مع البنية التحتية للتطبيقات، استنادا إلى أي من البنى المعمارية الموجهة نحو الخدمة أو التقليدية. مقاييس التداول هي الشركة الرائدة في مجال توفير برامج تحليلية للبنية التحتية للشبكة وأغراض رصد الكمون التطبيق (ترادينغمتريكس). يرتبط حل سيسكو أون فينانسيال سيرفيسز كمنتي مونيتورينغ (فسمز) بنوعين من الأحداث عند نقطة المراقبة: ترتبط أحداث الشبكة مباشرة مع التعامل مع رسائل الطلب المتزامنة تدفق أوامر التجارة وأحداث تحديث السوق المطابقة باستخدام الطوابع الزمنية التي تم تأكيدها عند نقطة التقاطها في فإن تحليل الوقت الحقيقي لهذه التدفقات المترابطة من البيانات يسمح بتحديد دقيق للاختناقات عبر البنية التحتية أثناء تنفيذ التجارة أو توزيع بيانات السوق. من خلال رصد وقياس الكمون في وقت مبكر من الدورة، يمكن للشركات المالية اتخاذ قرارات أفضل حول أي خدمة الشبكة والتي الوسيط أو السوق، أو الطرف المقابل لاختيار لتوجيه أوامر التجارة. وبالمثل، تتيح هذه المعرفة مزيدا من التبسيط في الوصول إلى بيانات السوق المحدثة (أسعار الأسهم، والأخبار الاقتصادية، وما إلى ذلك)، وهو ما يشكل أساسا هاما لبدء الفرص السوقية أو الانسحاب منها أو متابعتها. مكونات الحل هي: الأجهزة أون في ثلاثة عوامل شكل: وحدة الشبكة أون ل سيسكو 2600280037003800 الموجهات أون شفرة ل سيسكو محفز 6500 سلسلة أون 8340 الأجهزة مقاييس التداول برنامج مامبا 2.0، الذي يوفر رصد وتنبيه التطبيق، يعرض الرسوم البيانية الكمون على لوحة القيادة، ويصدر تنبيهات عند حدوث تباطؤ (tradingmetricsTMbrochure. pdf). الشكل 10 مراقبة وقت الاستجابة فيكس المستندة إلى أون سيسكو إب سلا أداة سيسكو إب سلا هي أداة مدمجة لإدارة الشبكة في سيسكو يوس تسمح للموجهات والمفاتيح بإنشاء تيارات حركة اصطناعية يمكن قياسها من حيث الكمون والارتعاش وفقدان الرزم ومعايير أخرى (سيسكوجيبسلا ). ومفهومان رئيسيان هما مصدر الحركة المتولدة والهدف. كل من هذه تشغيل مستجيب سلا إب، التي تقع على عاتق المسؤولية عن الطابع الزمني حركة المرور قبل أن يتم مصدرها وعادتها الهدف (لقياس ذهابا وإيابا). يمكن الحصول على أنواع حركة المرور المختلفة ضمن اتفاقية مستوى الخدمة (سلا) الخاصة ب إب، وهي تهدف إلى مقاييس مختلفة وتستهدف مختلف الخدمات والتطبيقات. وتستخدم عملية الارتعاش أودب لقياس التأخير في اتجاه واحد ورحلة ذهابا وإيابا الاختلافات. وبما أن حركة مرور الوقت مختومة على كل من إرسال واستهداف الأجهزة باستخدام قدرة المجيب، ويتميز تأخير رحلة ذهابا وإيابا كما دلتا بين الطابعين اثنين. تم إدخال ميزة جديدة في يوس 12.3 (14) T، إب سلا الفرعية ميلي ثانية التقرير، والذي يسمح للطوابع الزمنية ليتم عرضها مع قرار في ميكروثانية، وبالتالي توفير مستوى من التفاصيل غير متوفرة سابقا. وقد جعلت هذه الميزة الجديدة الآن سلا الملكية الفكرية ذات الصلة لشبكات الحرم الجامعي حيث الكمون الشبكة عادة ما يكون في حدود 300-800 ميكروثانية والقدرة على الكشف عن الاتجاهات والارتفاع (اتجاهات موجزة) على أساس ميكروثانية عدادات الحبيبية هو شرط للعملاء العاملين في الوقت وبيئات التداول الإلكترونية الحساسة. ونتيجة لذلك، يجري حاليا النظر في اتفاقية مستوى الخدمة (سلا) من قبل عدد كبير من المنظمات المالية حيث أنها تواجه جميعا متطلبات: الإبلاغ عن الكمون الأساسي لمستخدميها زمن الاستجابة الأساسي للإرسال بمرور الوقت الاستجابة السريعة لرشقات حركة المرور التي تسبب تغييرات في وقت الاستجابة المبلغ عنه، ميلي ثانية واحدة التقارير اللازمة لهؤلاء العملاء، حيث أن العديد من الحرم الجامعي والعظام الأساسية تقدم حاليا تحت الثانية من الكمون عبر عدة قفزات التبديل. عملت بيئات التداول الإلكترونية عموما للقضاء على أو تقليل جميع المناطق من الكمون الجهاز وشبكة لتقديم وفاء النظام السريع لرجال الأعمال. والإبلاغ عن أن أوقات استجابة الشبكة هي أقل من 1 ميلي ثانية واحدة لم يعد كافيا دقة دقة قياسات الكمون المبلغ عنها عبر شريحة الشبكة أو العمود الفقري تحتاج إلى أن تكون أقرب إلى 300-800 ثانية الصغرى مع درجة من القرار من 100 إيغراف ثانية. وأضافت اتفاقية مستوى الخدمة (سلا) إب مؤخرا دعما لتدفقات اختبار البث المتعدد إب، التي يمكن أن تقيس الكمون السوق البيانات. يتم عرض طوبولوجيا الشبكة النموذجية في الشكل 11 مع أجهزة التوجيه الظل ل سلا إب والمصادر والمستجيبين. الشكل 11 خدمات النفاذ إلى الخدمة (سلا) نشر خدمات الحوسبة السحابية تغطي خدمات الحوسبة مجموعة واسعة من التكنولوجيات بهدف إزالة الذاكرة واختناقات وحدة المعالجة المركزية التي تنشأ عن معالجة حزم الشبكة. تطبيقات التداول تستهلك كميات كبيرة من بيانات السوق والخوادم تضطر إلى تخصيص الموارد لمعالجة حركة مرور الشبكة بدلا من معالجة التطبيق. معالجة النقلالسرعات العالية، يمكن معالجة حزمة الشبكة تستهلك كمية كبيرة من دورات وحدة المعالجة المركزية الخادم والذاكرة. القاعدة المعمول بها تنص على أن 1Gbps من عرض النطاق الترددي للشبكة يتطلب 1 غيغاهرتز من قدرة المعالج (مصدر إنتل ورقة بيضاء على إو التسارع inteltechnologyioacceleration306517.pdf). النسخ الاحتياطي المؤقت كوبرينغ في تنفيذ كومة شبكة التقليدية، يحتاج إلى نسخ البيانات من قبل وحدة المعالجة المركزية بين مخازن الشبكة ومخازن المؤقتة التطبيق. هذه الحالة العامة تزداد سوءا بسبب حقيقة أن سرعات الذاكرة لم تواكب الزيادة في سرعات وحدة المعالجة المركزية. على سبيل المثال، المعالجات مثل إنتل زيون تقترب من 4 غيغاهرتز، في حين أن رقائق ذاكرة الوصول العشوائي تحوم حول 400MHz (ل در 3200 الذاكرة) (مصدر إنتل inteltechnologyioacceleration306517.pdf). تبديل السياق في كل مرة تحتاج إلى معالجة حزمة فردية، تقوم وحدة المعالجة المركزية بتنفيذ سياق التبديل من سياق التطبيق إلى سياق حركة مرور الشبكة. يمكن تخفيض هذه النفقات العامة إذا كان التبديل سيحدث فقط عند اكتمال المخزن المؤقت للتطبيق الكامل. الشكل 12 مصادر النفقات العامة في خوادم مراكز البيانات تفريغ حمولة تكب المحرك (تو) يتم نقل دورات معالج النقل إلى نيك. نقل تكبيب بروتوكول كومة المخزن المؤقت نسخ من ذاكرة النظام إلى ذاكرة نيك. الوصول إلى الذاكرة المباشرة عن بعد (ردما) يتيح محول شبكة لنقل البيانات مباشرة من التطبيق إلى التطبيق دون إشراك نظام التشغيل. يزيل النسخ المؤقت وسيطة التطبيق (استهلاك عرض النطاق الترددي الذاكرة). تجاوز النواة الوصول المباشر على مستوى المستخدم إلى الأجهزة. يقلل بشكل كبير من مفاتيح سياق التطبيق. الشكل 13 ردما و كيرنيل بايباس إنفينيباند عبارة عن وصلة اتصال تسلسلي ثنائي الاتجاه من نقطة إلى نقطة (من نوع إلى آخر) تقوم بتنفيذ ردما، من بين سمات أخرى. تقدم سيسكو مفتاح إنفينيباند، ومفتاح تبديل الخادم (سفس): ciscoapplicationpdfenusguestnetsolns500c643cdccont0900aecd804c35cb. pdf. الشكل 14 التطبيقات النمطية لنشر تطبيقات سفس تستفيد من تقليل التغير في الكمون والكمون، كما أثبت ذلك الاختبار الذي أجري مع سيسكو سفس و وومبات معالجات الأعلاف بواسطة ستاك ريزارتش: خدمة المحاكاة الافتراضية للتطبيق إزالة اقتران التطبيق من نظام التشغيل الأساسي وأجهزة الخادم تمكنهم من تشغيل خدمات الشبكة. يمكن تشغيل تطبيق واحد بالتوازي على خوادم متعددة، أو يمكن تشغيل تطبيقات متعددة على نفس الخادم، كما يملي أفضل تخصيص الموارد. ويتيح هذا الفصل تحسين موازنة التحميل والتعافي من الكوارث لاستراتيجيات استمرارية الأعمال. عملية إعادة تخصيص موارد الحوسبة إلى تطبيق ديناميكية. باستخدام نظام ظاهري للتطبيق مثل سينابسس غريدزرفر البيانات، يمكن للتطبيقات ترحيل، وذلك باستخدام السياسات التي تم تكوينها مسبقا، إلى خوادم أقل استخداما في عملية العرض-يطابق الطلب (networkworldsupp2005ndc1022105virtual. htmlpage2). هناك العديد من المزايا التجارية للشركات المالية التي تعتمد تطبيق المحاكاة الافتراضية: أسرع وقت لتسويق المنتجات والخدمات الجديدة تكامل أسرع للشركات بعد الاندماج والاكتساب النشاط زيادة توافر التطبيق توزيع أفضل لعبء العمل، مما يخلق المزيد من الغرف ذات الفراغات لمعالجة المسامير في حجم التداول التشغيلية الكفاءة والتحكم الحد من تعقيد تكنولوجيا المعلومات حاليا، لا يتم استخدام الظاهري التطبيق في مكتب الجبهة التجارية. إحدى حالات الاستخدام هي نمذجة المخاطر، مثل محاكاة مونتي كارلو. ومع تطور التكنولوجيا، يمكن تصور أن بعض منصات التداول ستعتمدها. خدمة المحاكاة الافتراضية للبيانات من أجل مشاركة الموارد بشكل فعال عبر تطبيقات المؤسسات الموزعة، يجب أن تكون الشركات قادرة على الاستفادة من البيانات عبر مصادر متعددة في الوقت الفعلي مع ضمان سلامة البيانات. With solutions from data virtualization software vendors such as Gemstone or Tangosol (now Oracle), financial firms can access heterogeneous sources of data as a single system image that enables connectivity between business processes and unrestrained application access to distributed caching. The net result is that all users have instant access to these data resources across a distributed network (gridtoday030210101061.html ). This is called a data grid and is the first step in the process of creating what Gartner calls Extreme Transaction Processing (XTP) (gartnerDisplayDocumentrefgsearchampid500947 ). Technologies such as data and applications virtualization enable financial firms to perform real-time complex analytics, event-driven applications, and dynamic resource allocation. One example of data virtualization in action is a global order book application. An order book is the repository of active orders that is published by the exchange or other market makers. A global order book aggregates orders from around the world from markets that operate independently. The biggest challenge for the application is scalability over WAN connectivity because it has to maintain state. Todays data grids are localized in data centers connected by Metro Area Networks (MAN). This is mainly because the applications themselves have limitsthey have been developed without the WAN in mind. Figure 15 GemStone GemFire Distributed Caching Before data virtualization, applications used database clustering for failover and scalability. This solution is limited by the performance of the underlying database. Failover is slower because the data is committed to disc. With data grids, the data which is part of the active state is cached in memory, which reduces drastically the failover time. Scaling the data grid means just adding more distributed resources, providing a more deterministic performance compared to a database cluster. Multicast Service Market data delivery is a perfect example of an application that needs to deliver the same data stream to hundreds and potentially thousands of end users. Market data services have been implemented with TCP or UDP broadcast as the network layer, but those implementations have limited scalability. Using TCP requires a separate socket and sliding window on the server for each recipient. UDP broadcast requires a separate copy of the stream for each destination subnet. Both of these methods exhaust the resources of the servers and the network. The server side must transmit and service each of the streams individually, which requires larger and larger server farms. On the network side, the required bandwidth for the application increases in a linear fashion. For example, to send a 1 Mbps stream to 1000recipients using TCP requires 1 Gbps of bandwidth. IP multicast is the only way to scale market data delivery. To deliver a 1 Mbps stream to 1000 recipients, IP multicast would require 1 Mbps. The stream can be delivered by as few as two serversone primary and one backup for redundancy. There are two main phases of market data delivery to the end user. In the first phase, the data stream must be brought from the exchange into the brokerages network. Typically the feeds are terminated in a data center on the customer premise. The feeds are then processed by a feed handler, which may normalize the data stream into a common format and then republish into the application messaging servers in the data center. The second phase involves injecting the data stream into the application messaging bus which feeds the core infrastructure of the trading applications. The large brokerage houses have thousands of applications that use the market data streams for various purposes, such as live trades, long term trending, arbitrage, etc. Many of these applications listen to the feeds and then republish their own analytical and derivative information. For example, a brokerage may compare the prices of CSCO to the option prices of CSCO on another exchange and then publish ratings which a different application may monitor to determine how much they are out of synchronization. Figure 16 Market Data Distribution Players The delivery of these data streams is typically over a reliable multicast transport protocol, traditionally Tibco Rendezvous. Tibco RV operates in a publish and subscribe environment. Each financial instrument is given a subject name, such as CSCO. last. Each application server can request the individual instruments of interest by their subject name and receive just a that subset of the information. This is called subject-based forwarding or filtering. Subject-based filtering is patented by Tibco. A distinction should be made between the first and second phases of market data delivery. The delivery of market data from the exchange to the brokerage is mostly a one-to-many application. The only exception to the unidirectional nature of market data may be retransmission requests, which are usually sent using unicast. The trading applications, however, are definitely many-to-many applications and may interact with the exchanges to place orders. Figure 17 Market Data Architecture Design Issues Number of GroupsChannels to Use Many application developers consider using thousand of multicast groups to give them the ability to divide up products or instruments into small buckets. Normally these applications send many small messages as part of their information bus. Usually several messages are sent in each packet that are received by many users. Sending fewer messages in each packet increases the overhead necessary for each message. In the extreme case, sending only one message in each packet quickly reaches the point of diminishing returnsthere is more overhead sent than actual data. Application developers must find a reasonable compromise between the number of groups and breaking up their products into logical buckets. Consider, for example, the Nasdaq Quotation Dissemination Service (NQDS). The instruments are broken up alphabetically: This approach allows for straight forward networkapplication management, but does not necessarily allow for optimized bandwidth utilization for most users. A user of NQDS that is interested in technology stocks, and would like to subscribe to just CSCO and INTL, would have to pull down all the data for the first two groups of NQDS. Understanding the way users pull down the data and then organize it into appropriate logical groups optimizes the bandwidth for each user. In many market data applications, optimizing the data organization would be of limited value. Typically customers bring in all data into a few machines and filter the instruments. Using more groups is just more overhead for the stack and does not help the customers conserve bandwidth. Another approach might be to keep the groups down to a minimum level and use UDP port numbers to further differentiate if necessary. The other extreme would be to use just one multicast group for the entire application and then have the end user filter the data. In some situations this may be sufficient. Intermittent Sources A common issue with market data applications are servers that send data to a multicast group and then go silent for more than 3.5 minutes. These intermittent sources may cause trashing of state on the network and can introduce packet loss during the window of time when soft state and then hardware shorts are being created. PIM-Bidir or PIM-SSM The first and best solution for intermittent sources is to use PIM-Bidir for many-to-many applications and PIM-SSM for one-to-many applications. Both of these optimizations of the PIM protocol do not have any data-driven events in creating forwarding state. That means that as long as the receivers are subscribed to the streams, the network has the forwarding state created in the hardware switching path. Intermittent sources are not an issue with PIM-Bidir and PIM-SSM. Null Packets In PIM-SM environments a common method to make sure forwarding state is created is to send a burst of null packets to the multicast group before the actual data stream. The application must efficiently ignore these null data packets to ensure it does not affect performance. The sources must only send the burst of packets if they have been silent for more than 3 minutes. A good practice is to send the burst if the source is silent for more than a minute. Many financials send out an initial burst of traffic in the morning and then all well-behaved sources do not have problems. Periodic Keepalives or Heartbeats An alternative approach for PIM-SM environments is for sources to send periodic heartbeat messages to the multicast groups. This is a similar approach to the null packets, but the packets can be sent on a regular timer so that the forwarding state never expires. S, G Expiry Timer Finally, Cisco has made a modification to the operation of the S, G expiry timer in IOS. There is now a CLI knob to allow the state for a S, G to stay alive for hours without any traffic being sent. The (S, G) expiry timer is configurable. This approach should be considered a workaround until PIM-Bidir or PIM-SSM is deployed or the application is fixed. RTCP Feedback A common issue with real time voice and video applications that use RTP is the use of RTCP feedback traffic. Unnecessary use of the feedback option can create excessive multicast state in the network. If the RTCP traffic is not required by the application it should be avoided. Fast Producers and Slow Consumers Today many servers providing market data are attached at Gigabit speeds, while the receivers are attached at different speeds, usually 100Mbps. This creates the potential for receivers to drop packets and request re-transmissions, which creates more traffic that the slowest consumers cannot handle, continuing the vicious circle. The solution needs to be some type of access control in the application that limits the amount of data that one host can request. QoS and other network functions can mitigate the problem, but ultimately the subscriptions need to be managed in the application. Tibco Heartbeats TibcoRV has had the ability to use IP multicast for the heartbeat between the TICs for many years. However, there are some brokerage houses that are still using very old versions of TibcoRV that use UDP broadcast support for the resiliency. This limitation is often cited as a reason to maintain a Layer 2 infrastructure between TICs located in different data centers. These older versions of TibcoRV should be phased out in favor of the IP multicast supported versions. Multicast Forwarding Options PIM Sparse Mode The standard IP multicast forwarding protocol used today for market data delivery is PIM Sparse Mode. It is supported on all Cisco routers and switches and is well understood. PIM-SM can be used in all the network components from the exchange, FSP, and brokerage. There are, however, some long-standing issues and unnecessary complexity associated with a PIM-SM deployment that could be avoided by using PIM-Bidir and PIM-SSM. These are covered in the next sections. The main components of the PIM-SM implementation are: PIM Sparse Mode v2 Shared Tree (spt-threshold infinity) A design option in the brokerage or in the exchange. Best Programming Language for Algorithmic Trading Systems One of the most frequent questions I receive in the QS mailbag is What is the best programming language for algorithmic trading. The short answer is that there is no best language. Strategy parameters, performance, modularity, development, resiliency and cost must all be considered. This article will outline the necessary components of an algorithmic trading system architecture and how decisions regarding implementation affect the choice of language. Firstly, the major components of an algorithmic trading system will be considered, such as the research tools, portfolio optimiser, risk manager and execution engine. Subsequently, different trading strategies will be examined and how they affect the design of the system. In particular the frequency of trading and the likely trading volume will both be discussed. Once the trading strategy has been selected, it is necessary to architect the entire system. This includes choice of hardware, the operating system(s) and system resiliency against rare, potentially catastrophic events. While the architecture is being considered, due regard must be paid to performance - both to the research tools as well as the live execution environment. What Is The Trading System Trying To Do Before deciding on the best language with which to write an automated trading system it is necessary to define the requirements. Is the system going to be purely execution based Will the system require a risk management or portfolio construction module Will the system require a high-performance backtester For most strategies the trading system can be partitioned into two categories: Research and signal generation. Research is concerned with evaluation of a strategy performance over historical data. The process of evaluating a trading strategy over prior market data is known as backtesting . The data size and algorithmic complexity will have a big impact on the computational intensity of the backtester. CPU speed and concurrency are often the limiting factors in optimising research execution speed. Signal generation is concerned with generating a set of trading signals from an algorithm and sending such orders to the market, usually via a brokerage. For certain strategies a high level of performance is required. IO issues such as network bandwidth and latency are often the limiting factor in optimising execution systems. Thus the choice of languages for each component of your entire system may be quite different. Type, Frequency and Volume of Strategy The type of algorithmic strategy employed will have a substantial impact on the design of the system. It will be necessary to consider the markets being traded, the connectivity to external data vendors, the frequency and volume of the strategy, the trade-off between ease of development and performance optimisation, as well as any custom hardware, including co-located custom servers, GPUs or FPGAs that might be necessary. The technology choices for a low-frequency US equities strategy will be vastly different from those of a high-frequency statistical arbitrage strategy trading on the futures market. Prior to the choice of language many data vendors must be evaluated that pertain to a the strategy at hand. It will be necessary to consider connectivity to the vendor, structure of any APIs, timeliness of the data, storage requirements and resiliency in the face of a vendor going offline. It is also wise to possess rapid access to multiple vendors Various instruments all have their own storage quirks, examples of which include multiple ticker symbols for equities and expiration dates for futures (not to mention any specific OTC data). This needs to be factored in to the platform design. Frequency of strategy is likely to be one of the biggest drivers of how the technology stack will be defined. Strategies employing data more frequently than minutely or secondly bars require significant consideration with regards to performance. A strategy exceeding secondly bars (i. e. tick data) leads to a performance driven design as the primary requirement. For high frequency strategies a substantial amount of market data will need to be stored and evaluated. Software such as HDF5 or kdb are commonly used for these roles. In order to process the extensive volumes of data needed for HFT applications, an extensively optimised backtester and execution system must be used. CC (possibly with some assembler) is likely to the strongest language candidate. Ultra-high frequency strategies will almost certainly require custom hardware such as FPGAs, exchange co-location and kernalnetwork interface tuning. Research Systems Research systems typically involve a mixture of interactive development and automated scripting. The former often takes place within an IDE such as Visual Studio, MatLab or R Studio. The latter involves extensive numerical calculations over numerous parameters and data points. This leads to a language choice providing a straightforward environment to test code, but also provides sufficient performance to evaluate strategies over multiple parameter dimensions. Typical IDEs in this space include Microsoft Visual CC, which contains extensive debugging utilities, code completion capabilities (via Intellisense) and straightforward overviews of the entire project stack (via the database ORM, LINQ ) MatLab. which is designed for extensive numerical linear algebra and vectorised operations, but in an interactive console manner R Studio. which wraps the R statistical language console in a fully-fledged IDE Eclipse IDE for Linux Java and C and semi-proprietary IDEs such as Enthought Canopy for Python, which include data analysis libraries such as NumPy. SciPy. scikit-learn and pandas in a single interactive (console) environment. For numerical backtesting, all of the above languages are suitable, although it is not necessary to utilise a GUIIDE as the code will be executed in the background. The prime consideration at this stage is that of execution speed. A compiled language (such as C) is often useful if the backtesting parameter dimensions are large. Remember that it is necessary to be wary of such systems if that is the case Interpreted languages such as Python often make use of high-performance libraries such as NumPypandas for the backtesting step, in order to maintain a reasonable degree of competitiveness with compiled equivalents. Ultimately the language chosen for the backtesting will be determined by specific algorithmic needs as well as the range of libraries available in the language (more on that below). However, the language used for the backtester and research environments can be completely independent of those used in the portfolio construction, risk management and execution components, as will be seen. Portfolio Construction and Risk Management The portfolio construction and risk management components are often overlooked by retail algorithmic traders. This is almost always a mistake. These tools provide the mechanism by which capital will be preserved. They not only attempt to alleviate the number of risky bets, but also minimise churn of the trades themselves, reducing transaction costs. 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 NumPySciPy 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. Execution Systems 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 andor 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 CJava 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. In software development, this essentially means how to break up the different aspects of the trading system into separate modular components. 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 TCPIP, 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 IO, concurrencyparallelism 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 NumPySciPy. 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 (disknetwork 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 doesnt need to be regenerated upon each loop of the trading algorithm. Such regeneration is likely to be a high CPU or disk IO 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. Another issue is dog-piling . where multiple generations of a new cache copy are carried out under extremely high load, which leads to cascade failure. 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 doesnt provide a native garbage collector and so it is necessary to handle all memory allocationdeallocation as part of an objects 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 Amdahls 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 Nvidias 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 concurrencymultithreading. 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 78, 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 rebootspatching (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 x86x64 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. قبل الانتهاء من كوديباس الفعلية سوف تفشل جميع الاختبارات. 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 pricesvolume, sudden rapid drawdowns and account exposure for different sectorsmarkets 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 wont 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 doesnt 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 NumPySciPy 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 licensingmaintenance costs. The Microsoft. NET 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. NET 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 pluginslibraries (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, MySQLPostgreSQL, 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. Further, they often allow interactive console based development, rapidly reducing the iterative development process. 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 dependencyversioning issues it is far less common to have to deal with incorrect library versions in such environments. Open source operating systems such as Linux can be trickier to administer. 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 systemprotocol (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 C11 spec, including native support for lambda expressions and concurrency. Python has the high performance NumPySciPyPandas 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 (MySQLC), JDBC (JavaMatLab), MySQLdb (MySQLPython) and psychopg2 (PostgreSQLPython). 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 . Conclusion 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. The benefit of a separated architecture is that it allows languages to be plugged in for different aspects of a trading stack, as and when requirements change. A trading system is an evolving tool and it is likely that any language choices will evolve along with it.

Comments

Popular posts from this blog

ثنائي الائتمان وضعت - الخيار

التكيف الحركة المتوسط ثنائي الموجة

شراء ، يضع خيار التداول