Wednesday 19 July 2017

อาคาร อัตโนมัติ Trading ระบบ จาวา


ในฐานะที่เป็นนักวิทยาศาสตร์คอมพิวเตอร์ที่คุณอยู่ในตำแหน่งที่สมบูรณ์แบบในการเริ่มต้นการซื้อขายแบบอัลกอริทึม นี่คือสิ่งที่ฉันได้เคยเห็นที่ Quantiacs1 ซึ่งนักวิทยาศาสตร์และวิศวกรสามารถข้ามไปสู่การซื้อขายอัตโนมัติได้โดยไม่ต้องมีประสบการณ์ใด ๆ มาก่อน กล่าวอีกนัยหนึ่งสับโปรแกรมเป็นองค์ประกอบหลักที่จำเป็นในการเริ่มต้น เพื่อทำความเข้าใจเกี่ยวกับสิ่งที่ท้าทายรอคุณอยู่หลังจากสร้างระบบการซื้อขายแบบอัลกอรึทึมให้ดูที่โพสต์ Quora นี้ การสร้างระบบการซื้อขายตั้งแต่ต้นจะต้องมีพื้นฐานความรู้พื้นฐานการซื้อขายข้อมูลการตลาดและการเข้าถึงตลาด ในขณะที่ไม่จำเป็นต้องเลือกแพลตฟอร์มการซื้อขายเดียวที่มีทรัพยากรเหล่านี้มากที่สุดจะช่วยให้คุณลุกขึ้นอย่างรวดเร็ว ที่กล่าวทักษะที่คุณพัฒนาจะโอนไปยังภาษาการเขียนโปรแกรมใด ๆ และเกือบทุกแพลตฟอร์ม เชื่อหรือไม่ว่าการสร้างกลยุทธ์การซื้อขายแบบอัตโนมัติไม่ได้เป็นการบอกกล่าวเป็นผู้เชี่ยวชาญด้านการตลาด อย่างไรก็ตามการเรียนรู้กลไกพื้นฐานของตลาดจะช่วยให้คุณค้นพบกลยุทธ์การซื้อขายที่มีกำไร ตัวเลือกฟิวเจอร์สและตราสารอนุพันธ์อื่น ๆ โดย John C. Hull - หนังสือเล่มแรกที่เยี่ยมยอดสำหรับการป้อนการเงินเชิงปริมาณและเข้าใกล้จากด้านคณิตศาสตร์ การค้าเชิงปริมาณโดย Ernie Chan - เออร์นี่จันทร์นำเสนอหนังสือที่ดีที่สุดสำหรับการซื้อขายเชิงปริมาณและนำคุณสู่ขั้นตอนการสร้างอัลกอริธึมการค้าใน MATLAB และ Excel การซื้อขายสัญญาซื้อขายล่วงหน้าขั้นสุดท้ายผ่านทางการเรียนรู้ด้วยเครื่อง - การแจกแจงแบบละเอียด 5 หน้าในการใช้โมเดลการเรียนรู้แบบง่ายๆกับตัวบ่งชี้การวิเคราะห์ทางเทคนิคที่ใช้ทั่วไป นี่เป็น PDF สำหรับอ่านหนังสือที่รวมกันโดยมีรายละเอียดเกี่ยวกับหนังสือวิดีโอหลักสูตรและฟอรัมการซื้อขาย วิธีที่ดีที่สุดในการเรียนรู้ก็คือการทำเช่นนี้และในกรณีของการซื้อขายอัตโนมัติที่เกิดขึ้นกับการสร้างแผนภูมิและการเข้ารหัส จุดเริ่มต้นที่ดีคือตัวอย่างที่มีอยู่ของระบบการซื้อขายและการจัดแสดงเทคนิคการวิเคราะห์ทางเทคนิคที่มีอยู่ นอกจากนี้นักวิทยาศาสตร์ด้านคอมพิวเตอร์ที่มีฝีมือมีขอบเพิ่มเติมในการใช้การเรียนรู้ของเครื่องจักรเพื่อการค้าอัลกอริทึม นี่คือบางส่วนของแหล่งข้อมูลเหล่านี้: TradingView - แพลตฟอร์มการสร้างแผนภูมิภาพยอดเยี่ยมด้วยตัวเอง TradingView เป็นสนามเด็กเล่นที่ยอดเยี่ยมสำหรับการรับความสะดวกสบายในการวิเคราะห์ทางเทคนิค มีประโยชน์เพิ่มเติมในการช่วยให้คุณสามารถใช้กลยุทธ์การซื้อขายหลักทรัพย์และเรียกดูแนวคิดการค้าของคนอื่น ๆ ได้ ฟอรัมการซื้อขายอัตโนมัติ - ชุมชนออนไลน์ที่ยอดเยี่ยมสำหรับการโพสต์คำถามเริ่มต้นและการหาคำตอบสำหรับปัญหาเกี่ยวกับควอนท์ทั่วไปเมื่อเริ่มต้นใช้งาน ฟอรัม Quant เป็นสถานที่ที่เยี่ยมยอดสำหรับกลยุทธ์เครื่องมือและเทคนิค การสัมมนา YouTube เกี่ยวกับแนวคิดการซื้อขายกับตัวอย่างโค้ดที่ทำงานบน Github การเรียนรู้ด้วยเครื่องจักร: สามารถดูข้อมูลเพิ่มเติมเกี่ยวกับการซื้อขายอัตโนมัติได้ที่ Quantiacs Quant Club คนส่วนใหญ่จากพื้นฐานทางวิทยาศาสตร์ (ไม่ว่าจะเป็นวิทยาการคอมพิวเตอร์หรือวิศวกรรม) ได้สัมผัสกับ Python หรือ MATLAB ซึ่งเป็นภาษาที่ได้รับความนิยมสำหรับการเงินเชิงปริมาณ Quantiacs ได้สร้างกล่องเครื่องมือโอเพนซอร์สที่ให้ข้อมูลหลังการขายย้อนหลังและ 15 ปีของข้อมูลการตลาดในอดีตได้ฟรี ส่วนที่ดีที่สุดคือทุกสิ่งทุกอย่างที่สร้างขึ้นทั้ง Python และ MATLAB ทำให้คุณสามารถเลือกพัฒนาระบบของคุณได้ นี่เป็นตัวอย่างกลยุทธ์การซื้อขายตามแนวโน้มใน MATLAB นี่คือรหัสทั้งหมดที่จำเป็นในการเรียกใช้ระบบการซื้อขายแบบอัตโนมัติซึ่งจัดแสดงทั้งพลังของ MATLAB และ Quantiacs Toolbox Quantiacs ช่วยให้คุณค้า 44 ฟิวเจอร์สและหุ้นทั้งหมดของ SampP 500 นอกจากนี้ยังมีไลบรารีเพิ่มเติมมากมายเช่น TensorFlow (Disclaimer: ฉันทำงานที่ Quantiacs) เมื่อ youre พร้อมที่จะทำเงินเป็นปริมาณที่คุณสามารถเข้าร่วมล่าสุด Quantiacs การแข่งขันการค้าอัตโนมัติที่มีทั้งหมด 2,250,000 ในการลงทุนที่มี: คุณสามารถแข่งขันกับ quants ที่ดีที่สุด 28.4k Views middot ดู Upvotes middot ไม่ได้สำหรับการทำซ้ำคำตอบนี้ได้รับการเขียนใหม่ทั้งหมดนี่คือ 6 ฐานความรู้หลักสำหรับการสร้างระบบการซื้อขาย algorithmic คุณควรทำความคุ้นเคยกับพวกเขาทั้งหมดเพื่อสร้างระบบการซื้อขายที่มีประสิทธิภาพ คำที่ใช้อาจใช้เทคนิคเล็กน้อย แต่คุณควรเข้าใจได้โดย Googling หมายเหตุ: (ส่วนใหญ่) เหล่านี้ใช้ไม่ได้หากคุณต้องการทำ High Frequency Trading 1. ทฤษฎีตลาดคุณต้องเข้าใจว่าตลาดทำงานอย่างไร โดยเฉพาะอย่างยิ่งคุณควรเข้าใจความไร้ประสิทธิภาพของตลาดความสัมพันธ์ระหว่างสินทรัพย์และผลิตภัณฑ์ที่แตกต่างกันและพฤติกรรมด้านราคา ความคิดการซื้อขายเกิดจากความไร้ประสิทธิภาพของตลาด คุณจะต้องรู้วิธีประเมินความไร้ประสิทธิผลของตลาดที่ทำให้คุณได้เปรียบในการซื้อขายกับผู้ที่ไม่เป็นเช่นนั้น การออกแบบหุ่นยนต์ที่มีประสิทธิภาพช่วยสร้างความเข้าใจว่าระบบการซื้อขายอัตโนมัติทำงานอย่างไร กลยุทธ์การค้าอัลกอริธึมประกอบด้วยองค์ประกอบหลัก 3 ส่วนคือ 1) รายการ 2) การออกและ 3) การจัดตำแหน่ง คุณจะต้องออกแบบองค์ประกอบทั้ง 3 องค์ประกอบนี้โดยคำนึงถึงความไร้ประสิทธิภาพของตลาดที่คุณจับ (และไม่ใช่นี่ไม่ใช่ขั้นตอนตรงไปตรงมา) คุณไม่จำเป็นต้องรู้คณิตศาสตร์ขั้นสูง (แม้ว่าจะช่วยคุณได้หากคุณต้องการสร้างกลยุทธ์ที่ซับซ้อนขึ้น) ทักษะการคิดเชิงวิพากษ์ที่ดีและความเข้าใจที่ดีเกี่ยวกับสถิติจะนำคุณไปไกลมาก การออกแบบเกี่ยวข้องกับการทดสอบย้อนหลัง (การทดสอบความสามารถในการซื้อขายและความทนทาน) และการเพิ่มประสิทธิภาพ (การเพิ่มประสิทธิภาพด้วยการปรับเส้นโค้งน้อยที่สุด) คุณจำเป็นต้องรู้วิธีจัดการพอร์ตการลงทุนของกลยุทธ์การค้าอัลกอริทึมด้วย กลยุทธ์อาจมีการเสริมหรือขัดแย้งกันอาจทำให้เกิดการเพิ่มขึ้นของความเสี่ยงหรือการป้องกันความเสี่ยงที่ไม่พึงประสงค์ การจัดสรรทุนมีความสำคัญเช่นกันเช่นคุณแบ่งเงินทุนออกเท่า ๆ กันในช่วงเวลาปกติหรือให้รางวัลผู้ชนะด้วยเงินทุนมากขึ้นหากคุณรู้ว่าผลิตภัณฑ์ใดที่คุณต้องการทำการค้าหาแพลตฟอร์มการซื้อขายที่เหมาะสมสำหรับผลิตภัณฑ์เหล่านี้ จากนั้นเรียนรู้ภาษา API การเขียนโปรแกรมของเครื่องมือทดสอบแพลตฟอร์มลัดนี้ ถ้าคุณเริ่มต้นออกไปฉันขอแนะนำ Quantopian (หุ้นเท่านั้น) Quantconnect (หุ้นและ FX) หรือ Metatrader 4 (FX และ CFDs ในดัชนีหุ้นหุ้นและสินค้าโภคภัณฑ์) ภาษาโปรแกรมที่ใช้คือ Python, C และ MQL4 ตามลำดับ 4. การจัดการข้อมูลขยะมูลฝอยในถังขยะ ข้อมูลที่ไม่ถูกต้องนำไปสู่ผลลัพธ์การทดสอบที่ไม่ถูกต้อง เราต้องการข้อมูลที่สะอาดพอสมควรสำหรับการทดสอบที่ถูกต้อง การทำความสะอาดข้อมูลเป็นการแลกเปลี่ยนระหว่างต้นทุนและความถูกต้อง ถ้าคุณต้องการข้อมูลที่ถูกต้องมากขึ้นคุณจำเป็นต้องใช้เวลามาก (เวลาเงิน) ทำความสะอาด ปัญหาบางอย่างที่ทำให้ข้อมูลที่สกปรกรวมถึงข้อมูลที่ขาดหายไปข้อมูลที่ซ้ำกันข้อมูลที่ไม่ถูกต้อง (bad ticks) ประเด็นอื่น ๆ ที่นำไปสู่ข้อมูลที่ไม่ถูกต้อง ได้แก่ การจ่ายเงินปันผลการแยกหุ้นและการซื้อขายสัญญาซื้อขายล่วงหน้าเป็นต้น 5. การบริหารความเสี่ยงมี 2 ประเภทหลัก ได้แก่ ความเสี่ยงด้านตลาดและความเสี่ยงด้านปฏิบัติการ ความเสี่ยงด้านตลาดเกี่ยวข้องกับความเสี่ยงที่เกี่ยวข้องกับกลยุทธ์การซื้อขายของคุณ จะพิจารณากรณีที่เลวร้ายที่สุดสถานการณ์ถ้าเกิดเหตุการณ์หงส์ดำเช่นสงครามโลกครั้งที่ 3 เกิดขึ้นคุณได้ป้องกันความเสี่ยงที่ไม่พึงประสงค์ตำแหน่งของคุณสูงเกินไปหรือไม่นอกจากการจัดการความเสี่ยงด้านตลาดคุณต้องดูความเสี่ยงด้านปฏิบัติการ ความล้มเหลวของระบบการสูญเสียการเชื่อมต่ออินเทอร์เน็ตอัลกอริธึมการประมวลผลที่ไม่ดี (นำไปสู่ราคาที่มีการใช้งานไม่ดีหรือพลาดการเทรดเนื่องจากไม่สามารถจัดการกับความล่าช้าได้) และการโจรกรรมโดยแฮกเกอร์เป็นเรื่องจริง 6. การดำเนินการแบบมีส่วนร่วม Backtesting และการซื้อขายสดแตกต่างกันมาก คุณจะต้องเลือกโบรกเกอร์ที่เหมาะสม (MM vs STP และ ECN) ข่าว Forex Market กับ Forex Trading Forums ความคิดเห็น Forex Forex Brokers เป็นเพื่อนที่ดีที่สุดของคุณอ่านบทวิจารณ์นายหน้าที่นั่น คุณต้องมีโครงสร้างพื้นฐานที่เหมาะสม (การรักษาความปลอดภัย VPN และการจัดการขัดข้อง ฯลฯ ) และขั้นตอนการประเมินผล (ตรวจสอบประสิทธิภาพของโรบอตและวิเคราะห์ข้อมูลเหล่านี้โดยคำนึงถึงประสิทธิภาพของตลาดที่ลดลง) เพื่อจัดการหุ่นของคุณตลอดอายุการใช้งาน คุณจำเป็นต้องทราบเมื่อต้องเข้าไปแทรกแซง (modifyupdateshutdownturn บนหุ่นยนต์ของคุณ) และเมื่อไม่ไป การประเมินผลและการเพิ่มประสิทธิภาพของกลยุทธ์การซื้อขาย Pardo (ข้อมูลเชิงลึกที่ดีเกี่ยวกับวิธีการสร้างและทดสอบกลยุทธ์การซื้อขาย) การค้าขายทางของคุณเพื่อความเป็นอิสระทางการเงิน Van K Tharp (ชื่อเรื่องเหยื่อไร้สาระคลิกหนังสือเล่มนี้เป็นภาพรวมที่ดีในระบบการค้าเชิงกล) Quantitative Trading Ernest การค้าและการแลกเปลี่ยน: โครงสร้างจุลภาคของตลาดสำหรับผู้ปฏิบัติงาน Larry Harris (โครงสร้างจุลภาคในตลาดเป็นศาสตร์แห่งการแลกเปลี่ยนความรู้และสิ่งที่เกิดขึ้นเมื่อมีการค้าขาย) เป็นสิ่งสำคัญที่ต้องทราบข้อมูลนี้ แม้ว่าคุณจะเพิ่งเริ่มออก) อัลกอริทึมการค้าอัลฟา DMA แบร์รี่จอห์นสัน (หลั่งแสงในขั้นตอนการดำเนินการของธนาคารนี้ไม่ได้ใช้โดยตรงการค้า algo ของคุณ แต่เป็นที่ดีที่จะรู้) Quants Scott Patterson (War เรื่องราวของบาง quants ด้านบนดี เมื่ออ่านก่อนนอน) Quantopian (รหัสการวิจัยและอภิปรายความคิดเห็นกับชุมชนใช้ Python) พื้นฐานของ Algo Trading Algo Trading101 (คำเตือน: ฉันเป็นเจ้าของ sitecourse นี้ เรียนรู้ทฤษฎีการออกแบบหุ่นยนต์ทฤษฎีตลาดและการเข้ารหัส (เรียนรู้แนวคิดการซื้อขายและทฤษฎีการทำ backtesting พวกเขาเพิ่งพัฒนา backtesting และแพลตฟอร์มการซื้อขายของตัวเองเพื่อให้ส่วนนี้ยังใหม่กับฉัน แต่ฐานความรู้ของพวกเขาเกี่ยวกับแนวคิดการซื้อขายเป็นสิ่งที่ดี) แนะนำ BlogsForums (รวมถึงการเงิน , การซื้อขายและฟอรัมการซื้อขายแบบอัลกอฮอล): ภาษาโปรแกรมที่แนะนำ: หากคุณรู้จักผลิตภัณฑ์ที่ต้องการซื้อขายโปรดค้นหาแพลตฟอร์มการซื้อขายที่เหมาะสมสำหรับผลิตภัณฑ์เหล่านี้ จากนั้นเรียนรู้ภาษา API การเขียนโปรแกรมของเครื่องมือทดสอบแพลตฟอร์มลัดนี้ ถ้าคุณเริ่มต้นออกไปฉันขอแนะนำ Quantopian (หุ้นเท่านั้น) Quantconnect (หุ้นและ FX) หรือ Metatrader 4 (FX และ CFDs ในดัชนีหุ้นหุ้นและสินค้าโภคภัณฑ์) ภาษาโปรแกรมที่ใช้คือ Python, C และ MQL4 ตามลำดับ 16.8k Views middot ดูคำ Upvotes middot Not for Reproduction ฉันมีพื้นฐานในการเป็นโปรแกรมเมอร์และตั้งทีมงานที่มีความคลั่งไคล้ก่อนที่จะเริ่มดูการซื้อขายแบบอัลกอลิกึม โลกของการค้าอัลกอริธึมทำให้ฉันหลงใหล แต่ก็สามารถครอบงำได้เล็กน้อย ฉันเริ่มได้มุมมองโดยการดำน้ำในแพลตฟอร์ม Quantopian การดูชุดการบรรยายแบบควอนตัมและใช้ระบบการซื้อขายแบบ algo ในชุมชนของฉันและปรับเปลี่ยนได้ในสภาพแวดล้อมของพวกเขา เหมือนที่ด้านล่าง: ฉันก็ตระหนักว่าจะได้รับในเร็วมากขึ้นฉันจะต้องพบกับคนที่รักการสร้างกลยุทธ์การซื้อขาย แต่ไม่สามารถโปรแกรม - เพื่อให้ตรงกับตัวเองเป็นผู้จัดการทีมเปรียวและโปรแกรมเมอร์ของระบบการค้า ดังนั้นฉันจึงได้เขียนหนังสือเกี่ยวกับการสร้างทีมเพื่อใช้ขั้นตอนวิธีการซื้อขายของคุณ ระบบการซื้อขายอาคารวิธีเปรียว: วิธีการสร้างระบบการซื้อขายอัลกอริธึมชนะเป็นทีม ในชุมชน Quantopian ฉันเห็นคนที่เข้าใจทางการเงินมองหาคนที่จะใช้กลยุทธ์การซื้อขายของพวกเขา แต่ที่กลัวที่จะขอให้โปรแกรมเมอร์ที่จะใช้ความคิดของพวกเขา เนื่องจากพวกเขาอาจเริ่มใช้แนวคิดการซื้อขายได้โดยปราศจากพวกเขา ฉันแก้ไขปัญหานี้ในหนังสือของฉัน เพื่อหลีกเลี่ยงโปรแกรมเมอร์ที่ใช้งานแนวคิดของคุณ: สร้างข้อกำหนดสำหรับแนวคิดการค้าของคุณโดยใช้กรอบรหัสที่เหมาะสำหรับประเภทกลยุทธ์ที่คุณต้องการพัฒนา อาจเป็นเรื่องยาก แต่เมื่อคุณรู้ขั้นตอนทั้งหมดของทารกและวิธีการที่พวกเขาพอดีกันจะค่อนข้างตรงไปตรงมาและสนุกในการจัดการหากคุณชอบคำตอบนี้โปรดลงคะแนนและปฏิบัติตาม แม้ว่าจะเป็นหัวข้อกว้าง ๆ ที่อ้างอิงถึงอัลกอริทึมของอาคารการตั้งค่าโครงสร้างพื้นฐานการจัดสรรสินทรัพย์และการบริหารความเสี่ยง แต่ฉันจะเน้นเฉพาะส่วนแรกของการสร้างอัลกอริธึมของเราเอง และทำในสิ่งที่ถูกต้อง 1. ยุทธศาสตร์การสร้าง ประเด็นสำคัญบางประการที่ควรทราบคือ: จับแนวโน้มใหญ่ - กลยุทธ์ที่ดีในทุกกรณีควรทำเงินเมื่อตลาดมีแนวโน้มสูง ตลาดมีแนวโน้มที่ดีซึ่งกินเวลาเพียง 15-20 เท่าของเวลา แต่นี่เป็นเวลาที่แมวและสุนัขทั้งหมด (พ่อค้าจากทุกกรอบเวลาวันรุ่งขึ้นรายวันรายสัปดาห์ระยะยาว) กำลังออกไปช้อปปิ้งและพวกเขาทั้งหมด มีธีมเดียว ผู้ค้าจำนวนมากยังสร้างกลยุทธ์การพลิกกลับหมายถึงซึ่งพวกเขาพยายามที่จะตัดสินเงื่อนไขเมื่อราคามีการเคลื่อนไหวห่างไกลจากค่าเฉลี่ยและใช้การค้ากับแนวโน้ม แต่ควรสร้างขึ้นเมื่อคุณสร้างและซื้อขายตามแนวโน้มที่ดี . อัตราการซ้อนขึ้น - คนมักทำงานต่อการพยายามสร้างระบบที่มีอัตราส่วนเงินชนะเลิศสูง แต่นั่นไม่ใช่วิธีการที่เหมาะสม ตัวอย่างเช่น algo กับผู้ชนะ 70 คนโดยมีกำไรเฉลี่ย 100 ต่อการค้าและการสูญเสียเฉลี่ย 200 ต่อการค้าจะทำให้ได้ 100 ต่อ 10 ธุรกิจการค้า (10trade net) แต่อัลกอร์กับผู้ชนะ 30 มีกำไรเฉลี่ย 500 ต่อการค้าและการสูญเสีย 100 ต่อการค้าจะมีกำไรสุทธิ 800 สำหรับ 10 ธุรกิจการค้า (80trade) ดังนั้นจึงไม่จำเป็นที่อัตราส่วน winloss ควรจะดีค่อนข้างจะเป็นอัตราเดิมพันของซ้อนขึ้นซึ่งควรจะดีกว่า นี้ไปโดยกล่าว quotKeep ขาดทุนเล็ก แต่ให้ผู้ชนะของคุณ runquot quotIn การลงทุนสิ่งที่สะดวกสบายจะไม่ค่อยเกิดผลกำไร - Robert Arnott Drawdown - การเบิกถอนเป็นสิ่งที่หลีกเลี่ยงไม่ได้หากคุณกำลังติดตามกลยุทธ์ประเภทใด ๆ ดังนั้นในขณะที่การออกแบบ algo don039t พยายามที่จะลดการเบิกหรือทำสภาพที่กำหนดเองบางอย่างที่จะดูแลการเบิกที่ เงื่อนไขที่เฉพาะเจาะจงนี้ในอนาคตอาจทำหน้าที่เป็นอุปสรรคในการดึงดูดแนวโน้มใหญ่ ๆ และการกระทำของคุณอาจทำงานได้ไม่ดี การบริหารความเสี่ยง - เมื่อสร้างยุทธศาสตร์คุณควรมีประตูทางออกทุกอย่างที่ตลาดเลือกที่จะทำ ตลาดเป็นสถานที่ที่น่าจะเป็นไปได้และคุณต้องออกแบบอัลกอฮ์เพื่อให้คุณออกจากการค้าโดยเร็วที่สุดเท่าที่จะเป็นไปได้หากไม่เหมาะกับความเสี่ยงของคุณ โดยปกติจะเป็นที่ถกเถียงกันอยู่ว่าคุณต้องเสี่ยง 1-2 ของเงินทุนในแต่ละการค้าและเป็นที่ดีที่สุดในหลายวิธีแม้ว่าคุณจะได้รับ arnd 10 การค้าเท็จในการสืบทอดทุนของคุณจะลงไปโดยเฉพาะ 20 แต่นี้ไม่ได้เป็น กรณีในสถานการณ์ตลาดที่เกิดขึ้นจริง บางธุรกิจการค้าที่สูญเสียจะอยู่ระหว่าง 0-1 ในขณะที่บางรายอาจไปที่ 3-4 ดังนั้นจึงควรกำหนดทุนการสูญเสียโดยเฉลี่ยต่อการค้าและทุนสูงสุดที่คุณสามารถหลวมในการซื้อขายได้เนื่องจากตลาดมีการสุ่มอย่างสมบูรณ์และสามารถตัดสินได้ . quotEvery ครั้งในขณะที่ตลาดทำบางสิ่งบางอย่างโง่ดังนั้นมันจะใช้เวลาลมหายใจของคุณ away. quot - Jim Cramer 2 การทดสอบและเพิ่มประสิทธิภาพ Slip ยุทธศาสตร์ เมื่อเรากำลังทดสอบกลยุทธ์เกี่ยวกับข้อมูลทางประวัติศาสตร์เราอยู่ภายใต้สมมติฐานว่าคำสั่งซื้อจะถูกดำเนินการในราคาที่กำหนดไว้ล่วงหน้าโดย algo แต่ตอนนี้ก็ไม่เป็นเช่นนั้นเพราะเราต้องจัดการกับผู้ผลิตในตลาดและ HFT algo0 ในขณะนี้ คำสั่งซื้อของคุณในโลกของวันนี้จะไม่ถูกเรียกใช้ในราคาที่ต้องการและจะมีการลื่นไถล นี้จะต้องรวมอยู่ในการทดสอบ ผลกระทบต่อตลาด: ปริมาณการซื้อขายโดย algo เป็นอีกหนึ่งปัจจัยสำคัญที่จะต้องพิจารณาในขณะที่ทำ back-testing และรวบรวมผลการดำเนินงานในอดีต เมื่อปริมาณเพิ่มขึ้นคำสั่งซื้อที่วางไว้โดย algo จะมีผลกระทบต่อตลาดมากและราคาเฉลี่ยของคำสั่งซื้อที่เต็มไปจะแตกต่างกันมาก algo ของคุณอาจให้ผลที่แตกต่างกันอย่างสมบูรณ์ในสภาวะตลาดที่แท้จริงถ้าคุณจะไม่ศึกษาพลวัตของไดรฟ์ข้อมูลที่ algo ของคุณมี การเพิ่มประสิทธิภาพ: ผู้ค้าส่วนใหญ่แนะนำให้คุณอย่าปรับเส้นโค้งและการเพิ่มประสิทธิภาพและถูกต้องเนื่องจากตลาดมีการทำงานของตัวแปรสุ่มและไม่มีสถานการณ์ใดที่จะเหมือนกัน ดังนั้นการเพิ่มประสิทธิภาพพารามิเตอร์สำหรับแต่ละสถานการณ์เป็นความคิดที่ไม่ดี ฉันขอแนะนำให้คุณไปที่ Zonal Optimization เป็นเทคนิคที่ฉันทำตามซื้อโซนระบุซึ่งมีลักษณะคล้ายกันในแง่ของความผันผวนและปริมาณ เพิ่มประสิทธิภาพพื้นที่เหล่านี้แยกกันมากกว่าการเพิ่มประสิทธิภาพตลอดช่วงเวลา ข้างต้นเป็นขั้นตอนพื้นฐานและสำคัญที่สุดบางส่วนที่ฉันทำตามเมื่อแปลงความคิดขั้นพื้นฐานเป็นอัลกอริทึมและตรวจสอบความถูกต้องของ it0 ทุกคนมีสติปัญญาในการปฏิบัติตามตลาดหุ้น ถ้าคุณทำมันผ่านทางคณิตศาสตร์เกรดห้าคุณสามารถทำมันได้ quotPeter Lynch 17.2k Views middot ดูคำ UpVotes middot Not for Reproduction คำตอบสั้น ๆ : เรียนรู้เกี่ยวกับคณิตศาสตร์ที่ใช้กับการซื้อขายโครงสร้างของตลาดและเลือกที่จะเป็นผู้จัดทำระบบเครือข่ายที่กระจายตัวที่สุด มีสามแทร็กที่อาจเป็นคู่ขนานซึ่งสามารถนำมาเรียนรู้การซื้อขายอัลกอริธึมจากรอยขีดข่วนได้โดยขึ้นอยู่กับวัตถุประสงค์สูงสุดที่คุณต้องการเรียนรู้ ที่นี่พวกเขาอยู่ในลำดับที่เพิ่มขึ้นของความยากลำบากซึ่งยังมีความสัมพันธ์กับเท่าใดก็จะกลายเป็นส่วนหนึ่งของชีวิตของคุณ คนก่อนหน้านี้จะเปิดโอกาสสำหรับคนต่อไปนี้ คุณสามารถหยุดที่ขั้นตอนใด ๆ ไปพร้อมกันเมื่อคุณได้เรียนรู้มากพอหรือได้งานทำ ถ้าคุณต้องการที่จะ quant, ส่วนใหญ่ใช้ซอฟต์แวร์คณิตศาสตร์และไม่จริงเป็นโปรแกรมเมอร์ของระบบ algo แล้วคำตอบสั้น ๆ จะได้รับปริญญาเอกในคณิตศาสตร์ฟิสิกส์หรือหัวข้อวิศวกรรมคณิตศาสตร์บางหนักที่เกี่ยวข้อง พยายามที่จะได้รับการฝึกงานที่กองทุนป้องกันความเสี่ยงชั้นนำร้านค้า prop หรือธนาคารเพื่อการลงทุน ถ้าคุณสามารถทำงานโดย บริษัท ที่ประสบความสำเร็จแล้วคุณจะได้รับการสอนมีอย่างอื่นมันก็ไม่ได้เกิดขึ้น อย่างไรก็ตามในกรณีใด ๆ คุณควรจะจบส่วน 039Self Study039 ด้านล่างเพื่อให้แน่ใจว่าคุณต้องการผ่านความพยายามในการรับปริญญาเอก ถ้าคุณไม่ได้เป็นอัจฉริยะหากคุณไม่ได้รับปริญญาเอกคุณจะไม่สามารถแข่งขันกับผู้ที่ทำงานนอกเสียจากคุณมีความเชี่ยวชาญในการเขียนโปรแกรมระบบการซื้อขาย ถ้าคุณต้องการที่จะเพิ่มเติมเกี่ยวกับด้านการเขียนโปรแกรมลองใช้สำหรับการจ้างงานหลังจากแต่ละขั้นตอน แต่ไม่บ่อยกว่าปีละครั้งต่อ บริษัท การศึกษาด้วยตนเองขั้นตอนแรกคือการเข้าใจว่าการซื้อขายแบบอัลกอริธึมคืออะไรและต้องใช้ระบบใดบ้างที่สนับสนุน I039d แนะนำให้อ่านผ่านแอ็พพลิเคชัน DMAquot (Johnson, 2010) ซึ่งเป็นสิ่งที่ผมเองแนะนำและสามารถแนะนำได้ ที่จะช่วยให้คุณเข้าใจในระดับพื้นฐาน ถัดไปคุณควรตั้งค่าหนังสือสั่งซื้อของคุณเองการจำลองข้อมูลตลาดอย่างง่ายและการใช้งานอัลกอริธึมหนึ่งตัวในเครื่องของคุณด้วย Java หรือ CC สำหรับเครดิตพิเศษที่จะช่วยในการรับงานคุณควรเขียนชั้นการสื่อสารเครือข่ายของคุณเองตั้งแต่เริ่มต้นด้วย เมื่อถึงจุดนี้คุณอาจจะสามารถตอบคำถามได้ด้วยตัวคุณเอง แต่สำหรับความสมบูรณ์และความอยากรู้อยากเห็นให้ดำเนินการต่อไป: หนังสือเล่มต่อไปที่จะแก้ไขปัญหาคือ quotTrading amp แลกเปลี่ยน: Microstructure ตลาดสำหรับ Practitionersquot (Harris, 2003) นี้จะเข้าสู่รายละเอียดปลีกย่อยของวิธีการตลาดทำงาน เป็นหนังสือ I039ve อ่านอื่น แต่ไม่ได้ศึกษาอย่างสมบูรณ์เพราะฉันเป็นโปรแกรมเมอร์ระบบไม่ใช่ quant หรือผู้จัดการด้านธุรกิจ ท้ายที่สุดถ้าคุณต้องการเริ่มต้นเรียนรู้คณิตศาสตร์เกี่ยวกับวิธีการทำงานของตลาดให้ทำงานผ่านข้อความและปัญหาใน quotOptions Futures และ Derivativesquot (Hull, 2003) ฉันทำมันผ่านประมาณครึ่งหนึ่งของตำราที่ทั้งในการเตรียมการหรือเป็นส่วนหนึ่งของการฝึกอบรมภายในที่หนึ่งในนายจ้างเก่าของฉัน ฉันเชื่อว่าฉันเป็นคนแรกที่ค้นพบเกี่ยวกับหนังสือเล่มนี้เนื่องจากเป็นข้อเสนอแนะหรือต้องอ่านสำหรับโปรแกรมคณิตศาสตร์ MS Financial ที่ได้รับการยกย่องเป็นอย่างดี เพื่อให้โอกาสที่ดีกว่าในการจ้างงานผ่านโปรแกรมป้อนข้อมูลใหม่ให้เสร็จสิ้นโปรแกรม MS Financial Mathematics หากคุณต้องการเป็นโปรแกรมเมอร์สำหรับแพลตฟอร์มการซื้อขายหรือทีมงานของ Quants ถ้าคุณต้องการที่จะเป็นหนึ่งในการออกแบบ algos แล้วคุณจะต้องใช้เส้นทาง PhD อธิบายก่อนหน้านี้ หากคุณยังเรียนจบไม่ได้แล้วให้พยายามเข้ารับการฝึกงานที่สถานที่เดียวกัน การจ้างงานไม่ว่าคุณจะเรียนหนังสือและโรงเรียนเท่าใดไม่มีอะไรจะเปรียบเทียบกับรายละเอียดเล็กน้อยที่คุณเรียนรู้ขณะที่ทำงานให้ บริษัท หากคุณไม่ทราบกรณีขอบทั้งหมดและรู้ว่าเมื่อโมเดลของคุณหยุดทำงานคุณจะเสียเงิน ฉันหวังว่าจะตอบคำถามของคุณและในระหว่างการเรียนรู้คุณจะค้นพบว่าคุณต้องการเปลี่ยนจากการศึกษาเป็นงานประจำวันจริงหรือไม่ 18.5k Views middot ดู Upvotes middot ไม่ได้สำหรับการทำซ้ำโบรกเกอร์แบบโต้ตอบโบรกเกอร์เชิงโต้ตอบมีแพลตฟอร์มการลงทุนจริงๆบากด้านบนและการกำหนดราคาที่ดี It 's แน่นอนเครื่องมือที่มีประสิทธิภาพเพื่อให้คุณอาจจะได้รับทางเลือกที่ถูกกว่าจากโบรกเกอร์ส่วนลดเช่น Etrade และ Scottrade แต่ถ้า you039re ร้ายแรงเกี่ยวกับการซื้อขาย algorithmic, IB เป็นที่ของ it ที่ที่ InvestFly Success เป็นข้อมูลเกี่ยวกับการปฏิบัติและการทดสอบสมมติฐานและอัลกอริทึมของคุณ ทดสอบย้อนหลังทดสอบตลาดและเปรียบเทียบกับผู้อื่น ฉันชอบ Investfly - Virtual Stock Exchange กลยุทธ์การซื้อขายเกมแอ็กเซ็ตเทรดดิ้ง แต่มีตันของโปรแกรมที่ดีออกมี Idea Generation Don039t เริ่มต้นจากศูนย์พื้นดิน - ฉันชอบรับแนวคิดจาก Motif Investing (Online Brokerage, ไอเดียการลงทุน, การซื้อขายหุ้น) และ Alpha หา แต่มองภาพใหญ่และคิดว่าสิ่งเหล่านี้ใช้กับสมมติฐานของคุณอย่างไรและ สูตร ไชโยและโชคดี 4.5k Views middot ดู Upvotes middot Not for Reproduction หากการลงทุนเป็นกระบวนการแล้วสรุปตรรกะเป็นระบบอัตโนมัติ อัลกอริทึมเป็นอะไรอย่างอื่นนอกเหนือจากการวางรากฐานที่สำคัญของปรัชญาพื้นฐาน นี่คือการแสดงออกทางสีหน้าของขอบการซื้อขายขอบการซื้อขาย Win การสูญเสียรายได้เฉลี่ยที่สูญเสียไปมันทำให้ชีวิตฉันและวิธีที่ฉันเข้าใกล้ตลาด แสดงภาพการกระจายของคุณเสมอ มันจะช่วยให้คุณชี้แจงแนวคิดของคุณให้กระจ่างต่อข้อบกพร่องเชิงตรรกะของคุณ แต่ก่อนอื่นเราควรเริ่มต้นด้วยปรัชญาและความเชื่อที่เกิดขึ้น 1. ทำไมมันสำคัญที่จะชี้แจงความเชื่อของคุณเราจึงค้าความเชื่อของเรา ที่สำคัญเราค้าความเชื่อทางจิตใต้สำนึกของเรา หากคุณไม่ทราบว่าคุณเป็นใครการตลาดเป็นสถานที่ที่มีราคาแพงเพื่อหาข้อผิดพลาดบางอย่าง Adam Smith หลายคนไม่ได้ใช้เวลาในการกระตุ้นความเชื่อของตนและใช้ความเชื่อที่ยืมมา คำถามที่ไม่ได้รับคำตอบและตรรกะผิดพลาดคือเหตุผลว่าทำไมผู้ค้าระบบบางรายจึงปรับแต่งระบบของตนโดยรอบการเบิกจ่ายแต่ละครั้ง ฉันเคยเป็นเช่นนั้นเป็นเวลาหลายปี การออกกำลังกายกระตุ้นความเชื่อ: งาน Byron Katie หลังจากที่ฉันได้รับความเชื่อมั่น 2 ครั้งต่อวันเป็นเวลา 100 วันแล้วฉันสามารถอธิบายสไตล์ของฉันกับคุณยาย 5 ได้ ถามตัวเองว่าทำไมและดำน้ำลึกขึ้น มีความคิดสองประเภทและเราต้องการทั้งสองแบบในเวลาที่ต่างกัน: กว้างไกลเพื่อสำรวจแนวความคิดความคิดเทคนิค ฯลฯ Subtractive: เพื่อให้ง่ายขึ้นและชี้แจงแนวคิดผู้ค้าระบบที่ล้มเหลวในการหักบัญชีมี วิธีปั่น พวกเขาโยนทุกสิ่งในกลยุทธ์ของพวกเขาและผสมผสานกับ optimizer การย้ายที่ไม่ดี: ความซับซ้อนเป็นรูปแบบของความเกียจคร้าน พวกเขายากรหัสทุกอย่างและจากนั้นโชคดี patching traders quotot อีเทอร์สสิสต์เข้าใจว่ามันเป็นการเต้นรำระหว่างช่วงเวลาของการสำรวจและเวลาของการทำให้ง่ายขึ้นหลักยาก เรื่องง่ายไม่ใช่เรื่องง่ายเวลาพาฉันไป 3,873 ชั่วโมงและฉันยอมรับว่ามันอาจใช้เวลาถึงชีวิต 2 เวลาที่คุณรู้ว่าการค้าขายทำกำไรได้หรือไม่ก็คือหลังจากทางออกขวาดังนั้นให้เน้นตรรกะทางออกก่อน ในความเห็นของฉันเหตุผลหลักที่ทำให้ผู้คนล้มเหลวในการทำให้กลยุทธ์ของตนโดยอัตโนมัติคือการมุ่งเน้นที่รายการมากเกินไปและไม่เพียงพอในการออก คุณภาพของช่องทางออกของคุณจะเป็นตัวกำหนดรูปแบบการกระจาย PampL ของคุณดูแผนภูมิด้านบนใช้เวลาในการหยุดการขาดทุนอย่างมากเนื่องจากมีผลกระทบต่อ 4 องค์ประกอบของระบบการซื้อขายของคุณคือ Win สูญเสียการสูญเสียเฉลี่ยความถี่ในการซื้อขายคุณภาพของระบบของคุณจะพิจารณาจากคุณภาพของ PampL ขาดทุนของคุณหยุด, 3 เงินจะทำในโมดูลการจัดการเงินน้ำหนักที่เท่าเทียมกันเป็นรูปแบบของความเกียจคร้าน ขนาดของการเดิมพันของคุณจะเป็นตัวกำหนดรูปร่างของผลตอบแทนของคุณ ทำความเข้าใจว่ากลยุทธ์ของคุณใช้งานได้ไม่ดีและลดขนาด ในทางตรงกันข้ามให้เพิ่มขนาดเมื่อทำงาน ฉันจะเขียนเพิ่มเติมเกี่ยวกับการกำหนดขนาดตำแหน่งบนเว็บไซต์ของฉัน แต่มีทรัพยากรมากมายทั่วอินเทอร์เน็ต 3. รายการสุดท้ายและอย่างน้อยที่สุดหลังจากที่คุณได้ดูฤดูกาลเต็มรูปแบบของแม่บ้านที่พูดพาดพิงถึงหรือเบ็ดเตล็ดที่มีข้อความว่ามีช็อคโกแลตบางตัวเดินสุนัขเลี้ยง ปลาที่เรียกว่าแม่ของคุณแล้วก็ถึงเวลาที่จะคิดเกี่ยวกับการเข้า อ่านสูตรด้านบนการเลือกสต็อกไม่ใช่องค์ประกอบหลัก หนึ่งอาจเถียงว่าการเลือกหุ้นที่เหมาะสมอาจเพิ่มขึ้นชนะ บางที แต่ก็ไม่มีค่าถ้าไม่มีนโยบายออกที่เหมาะสมหรือการจัดการเงิน ในแง่น่าจะเป็นหลังจากที่คุณได้รับการแก้ไขทางออกแล้วรายการจะกลายเป็นความน่าจะเป็นระดับการเลื่อน 4. สิ่งที่ควรเน้นเมื่อทดสอบไม่มีค่าเฉลี่ยขยับขลังค่าบ่งชี้ เมื่อทดสอบระบบของคุณให้โฟกัสไปที่สามประการ: False positives: ทำให้ประสิทธิภาพการทำงานลดลง หาวิธีที่เรียบง่าย (สง่างาม) เพื่อลดปัญหาเหล่านี้ทำงานในช่วงตรรกะเมื่อกลยุทธ์ไม่ทำงาน: ไม่มีกลยุทธ์ทำงานตลอดเวลา เตรียมพร้อมรับมือและเตรียมแผนฉุกเฉินล่วงหน้า การปรับระบบในระหว่างการเบิกเป็นเหมือนการเรียนรู้ที่จะว่ายน้ำในพายุซื้ออำนาจและการจัดการเงิน: นี่เป็นอีกหนึ่งความเป็นจริงที่เคาน์เตอร์ที่ใช้งานง่าย ระบบของคุณอาจสร้างไอเดีย แต่คุณไม่มีอำนาจในการซื้อเพื่อดำเนินการ โปรดดูแผนภูมิด้านบนที่ฉันสร้างกลยุทธ์ทั้งหมดจากด้านสั้น ๆ ก่อน การทดสอบประสิทธิภาพที่ดีที่สุดสำหรับยุทธศาสตร์คือด้านสั้น: ความหนาแน่นของไดรฟ์ข้อมูลที่สั้นลงวัฏจักรที่สั้นลงแพลตฟอร์มฉันเริ่มต้นจากนักพัฒนา WealthLab มีไลบรารีปรับขนาดที่น่าสนใจ นี่คือแพลตฟอร์มเดียวที่ช่วยให้สามารถ backtetsing และเพิ่มประสิทธิภาพได้อย่างกว้างขวาง ฉันทดสอบแนวคิดทั้งหมดของ WLD ขอเเนะนำ. มีข้อเสียเปรียบเพียงอย่างเดียวก็ไม่ได้เชื่อมต่อ sizer ตำแหน่งกับการซื้อขายสดที่แท้จริง Amibroker เป็นสิ่งที่ดีเกินไป มี API ที่เชื่อมต่อกับโบรกเกอร์เชิงโต้ตอบและไซส์ poisition ที่เหมาะสม เรามีโปรแกรม MetaTrader for Forex แต่น่าเสียดายที่ Metatrader ได้ไปลงหลุมกระต่ายความซับซ้อน มีชุมชนที่มีชีวิตชีวาอยู่ที่นั่น MatLab ซึ่งเป็นอาวุธที่เหมาะสำหรับวิศวกร ไม่มีความเห็น. Tradestation Perry Kaufman เขียนหนังสือดีๆเกี่ยวกับ TS มีชุมชนที่มีชีวิตชีวาอยู่ที่นั่น มันง่ายกว่าแพลตฟอร์มอื่น ๆ ส่วนใหญ่คำแนะนำขั้นสุดท้ายถ้าคุณต้องการเรียนรู้ที่จะว่ายน้ำคุณต้องกระโดดลงไปในน้ำ สามเณรหลายคนต้องการที่จะส่งความคิดของพวกเขาพันล้านดอลลาร์ไปยังโปรแกรมเมอร์ราคาถูกบางแห่งที่ไหนสักแห่ง ไม่ได้ผลเช่นนั้น คุณจำเป็นต้องเรียนรู้ภาษาเหตุผล มองหา TradeLink (C) หรือ ActiveQuant (Java) โดยไม่คำนึงถึงการสืบพันธุ์ รหัส TradeLink0 มีความสง่างามมากขึ้น I039m พิมพ์นี้บนโทรศัพท์มือถือดังนั้นโปรดแก้ตัวความกะทัดรัดของฉัน โดยทั่วไปดูสิ่งที่มาใน vs สิ่งที่ออกไปเป็นวิธีเริ่มต้นเพื่อกรอบปัญหา ใน. ข้อมูลการตลาด, เหตุการณ์ exhangemarket (การดำเนินการกับธุรกิจการค้าที่ระบบของคุณวาง, acks, ปฏิเสธ, การซื้อขายหยุดการแจ้งเตือน ฯลฯ ) ออก. การสั่งซื้อการปรับเปลี่ยน ordes quotBuy 100 15.5, IOCquot เป็นต้น IOC ทันทีหรือยกเลิก ในระหว่าง. การตัดสินใจเชิงกลยุทธ์บนพื้นฐานของข้อมูลที่รวบรวมจากข้อมูลเรียลไทม์ร่วมกับข้อมูลในอดีตและข้อมูลอื่น ๆ (คำสั่ง trader0 จาก GUI ของเขาเพื่อการค้าที่ไม่ก้าวร้าวและอื่น ๆ ) สิ่งที่ชอบ สั่งซื้อแก้ไขคำสั่งซื้อที่มีอยู่ ฯลฯ ตอนนี้คุณสามารถเริ่มต้นเพื่ออธิบายถึงสถาปัตยกรรมทางเทคนิคของระบบดังกล่าว สิ่งสำคัญคือความสามารถในการแสดงกลยุทธ์ได้อย่างง่ายดายแม้จะมีความซับซ้อนของการประมวลผลเหตุการณ์ (มีหลายสภาวะการแข่งขันที่น่าสนใจซึ่งอาจทำให้ระบบของคุณสับสนกับการเข้าสู่สภาวะตลาดที่คุณสั่งซื้อได้) ฉันเคยทำเช่นนี้เพื่อหาเลี้ยงชีพและอาจจะไปได้ไม่รู้จบ แต่การพิมพ์บนโทรศัพท์มือถือเป็นตัวยับยั้ง หวังว่าคุณจะพบว่ามีประโยชน์ ติดต่อฉันหากคุณต้องการคำแนะนำเพิ่มเติม 21.2k Views middot ดูคำ Upvotes middot ไม่ได้สำหรับการทำซ้ำอัปเดต 100w ago middot Upvoted โดย Patrick J Rooney 5 ปีอาชีพการค้าฉันมีความเชี่ยวชาญในขั้นสูง o เริ่มต้นด้วยพื้นฐานได้รับถือของ Amibroker (AmiBroker - Download) Amibroker มีภาษาที่ง่ายต่อการเรียนรู้และมีประสิทธิภาพในการทำ backtest engine ซึ่งคุณสามารถสร้างต้นแบบความคิดของคุณได้ ยังได้รับ Howard Bandy 039s หนังสือระบบการซื้อขายเชิงปริมาณ หนังสือเล่มนี้เป็นบทนำที่ดีมากสำหรับแนวคิดการพัฒนาเชิงปริมาณ คุณจะต้องมีความรู้พื้นฐานเกี่ยวกับสถิติด้วยเช่นกัน มีหลักสูตร MOOC ที่ดีมากมายสำหรับหลักสูตรนี้ฟรี เช่นหนึ่งสถิติ One - Princeton University Coursera It0 ยังคุ้มค่าต่อไปนี้ The Whole Street ซึ่งเป็น mashup ของบล็อก quant ทั้งหมดซึ่งหลายคนเผยแพร่ Amibroker code ด้วยไอเดียของพวกเขา จากนั้นการเรียนรู้ Python ของ Python (เรียนรู้ Python - Google Search) และการเรียนรู้หลักสูตร Stanford University Machine Learning ที่ดีเยี่ยมของ Andrew Ng0 ซึ่งทำงานฟรีใน Coursera ถ้าคุณต้องการใส่อัลกอริทึมของคุณเองเพื่อทดสอบไซต์ที่ดีว่า Quantconnect หรือ Quantopian โชคดีกับการเดินทางส่วนหนึ่งมาจากคำตอบของ Alan Clement0 สำหรับนักพัฒนาซอฟต์แวร์ในด้านการเงินอาจกลายเป็นผู้พัฒนาระบบควอนตัม 16.2k Views middot ดูคำ UpVotes middot Not for ReproductionBest Programming Language สำหรับระบบการค้าอัลกอริทึมหนึ่งในคำถามที่พบบ่อยที่สุดที่ฉันได้รับในกล่องจดหมาย QS คืออะไรภาษาการเขียนโปรแกรมที่ดีที่สุดสำหรับการซื้อขายแบบอัลกอริธึม คำตอบสั้น ๆ ก็คือไม่มีภาษาที่ดีที่สุด ควรพิจารณาพารามิเตอร์ยุทธศาสตร์ประสิทธิภาพ modularity การพัฒนาความยืดหยุ่นและค่าใช้จ่ายทั้งหมด บทความนี้จะสรุปองค์ประกอบที่จำเป็นของสถาปัตยกรรมระบบการค้าแบบอัลกอริทึมและวิธีการตัดสินใจเกี่ยวกับการใช้งานมีผลต่อการเลือกภาษา ประการแรกส่วนประกอบสำคัญของระบบการค้าอัลกอริธึมจะได้รับการพิจารณาเช่นเครื่องมือในการวิจัยเครื่องมือเพิ่มประสิทธิภาพพอร์ตการลงทุนผู้จัดการความเสี่ยงและเครื่องมือการดำเนินการ ต่อมาจะมีการตรวจสอบกลยุทธ์การซื้อขายที่แตกต่างกันและจะมีผลต่อการออกแบบระบบอย่างไร โดยเฉพาะอย่างยิ่งความถี่ของการซื้อขายและปริมาณการซื้อขายที่คาดว่าจะมีการหารือกัน เมื่อเลือกกลยุทธ์การซื้อขายแล้วจะต้องมีการสถาปนิกทั้งระบบ ซึ่งรวมถึงทางเลือกของฮาร์ดแวร์ระบบปฏิบัติการ (s) และความยืดหยุ่นของระบบกับเหตุการณ์ที่หายากที่อาจเกิดภัยพิบัติ ในขณะที่สถาปัตยกรรมกำลังอยู่ในระหว่างการพิจารณาคำนึงถึงความสำคัญของผลการปฏิบัติงานทั้งในด้านเครื่องมือการวิจัยและสภาพแวดล้อมในการดำเนินงานจริง ระบบการซื้อขายกำลังพยายามทำอะไรก่อนที่จะตัดสินใจเลือกภาษาที่ดีที่สุดในการเขียนระบบการซื้อขายอัตโนมัติจำเป็นต้องกำหนดข้อกำหนด ระบบจะดำเนินการโดยสิ้นเชิงหรือไม่ระบบจะต้องมีระบบการจัดการความเสี่ยงหรือโมดูลการสร้างพอร์ตโฟลิโอระบบจะต้องใช้ backtester ประสิทธิภาพสูงสำหรับกลยุทธ์ส่วนใหญ่ระบบการซื้อขายสามารถแบ่งออกเป็น 2 ประเภท ได้แก่ การวิจัยและการสร้างสัญญาณ การวิจัยเกี่ยวข้องกับการประเมินผลการดำเนินงานด้านกลยุทธ์มากกว่าข้อมูลในอดีต กระบวนการประเมินกลยุทธ์การซื้อขายมากกว่าข้อมูลตลาดก่อนหน้านี้เรียกว่า backtesting ขนาดข้อมูลและความซับซ้อนของขั้นตอนวิธีจะมีผลกระทบอย่างมากต่อความเข้มของการคำนวณของ backtester ความเร็วของซีพียูและภาวะพร้อมกันมักเป็นปัจจัย จำกัด ในการเพิ่มประสิทธิภาพความเร็วในการดำเนินการวิจัย การสร้างสัญญาณเกี่ยวข้องกับการสร้างชุดสัญญาณการซื้อขายจากอัลกอริทึมและส่งคำสั่งซื้อดังกล่าวไปยังตลาดโดยปกติจะผ่านการเป็นนายหน้าซื้อขายหลักทรัพย์ สำหรับกลยุทธ์บางอย่างจำเป็นต้องมีประสิทธิภาพระดับสูง ปัญหา IO เช่นแบนด์วิธเครือข่ายและเวลาแฝงมักเป็นปัจจัย จำกัด ในการเพิ่มประสิทธิภาพระบบปฏิบัติการ ดังนั้นการเลือกภาษาสำหรับส่วนประกอบต่างๆของระบบทั้งหมดของคุณอาจแตกต่างกันออกไป 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. 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 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. มีข้อดีและข้อเสียของทั้งสองวิธี 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 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 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. Just Getting Started with Quantitative TradingIt Doesnt Seem Possible. แต่ด้วยยุทธศาสตร์การค้าอัลกอริทึมของเราเราไม่สามารถทำได้ ระบบการซื้อขายแบบอัลกอริธึมที่มีการระบุถึงแนวโน้มมากการวิเคราะห์วัฏจักรปริมาณการซื้อขายด้าน buysell กลยุทธ์การซื้อขายหลายแบบรายการแบบไดนามิกกำหนดเป้าหมายและหยุดราคาและเทคโนโลยีสัญญาณอัลตร้าไวด์ แต่มันคือ. อันที่จริงแพลตฟอร์มระบบการค้าอัลกอริธึม AlgoTrades เป็นเพียงระบบเดียวเท่านั้น ไม่มีการค้นหาหุ้นร้อนภาคสินค้าโภคภัณฑ์ดัชนีหรืออ่านความคิดเห็นของตลาด Algotrades ทำการค้นหาระยะเวลาและการซื้อขายให้กับคุณโดยใช้ระบบการซื้อขายแบบอัลกอรึทึมของเรา AlgoTrades พิสูจน์กลยุทธ์สามารถปฏิบัติด้วยตนเองโดยได้รับอีเมลและการแจ้งเตือนข้อความ SMS หรือสามารถ 100 ซื้อขายแฮนด์ฟรีขึ้นอยู่กับคุณคุณสามารถเปิด onoff การซื้อขายอัตโนมัติได้ตลอดเวลาเพื่อให้คุณอยู่เสมอในการควบคุมโชคชะตาของคุณ ระบบการซื้อขายอัตโนมัติสำหรับนักลงทุน Savvy Copyright 2017 - ALGOTRADES - ระบบการซื้อขายขั้นตอนแบบอัตโนมัติ CFTC RULE 4.41 - ผลการดำเนินงานที่สมมุติฐานหรือผลการดำเนินงานที่จำลองขึ้นมีข้อ จำกัด บางอย่าง ไม่ว่าจะเป็นบันทึกผลการดำเนินงานที่แท้จริงผลลัพธ์ที่จำลองไม่ได้แสดงถึงการซื้อขายตามปกติ นอกจากนี้เนื่องจากการค้ายังไม่ได้รับผลกระทบผลลัพธ์อาจมีน้อยกว่าหรือมากกว่าที่จะได้รับผลกระทบหากมีปัจจัยการตลาดบางอย่างเช่นการขาดสภาพคล่อง โปรแกรมเทรดดิ้งที่จำลองในเรื่องทั่วไปจะต้องเป็นไปตามข้อเท็จจริงที่ว่าพวกเขาได้รับการออกแบบมาพร้อมกับประโยชน์ของยุคเีดียว ไม่มีผู้ถือหุ้นรายใดแสดงว่าบัญชีใดจะเป็นประโยชน์หรือเป็นไปได้ที่จะทำกำไรหรือขาดทุนให้คล้ายคลึงกัน ไม่มีการแสดงหรือการบอกกล่าวเป็นนัยว่าการใช้ระบบการค้าแบบอัลกอลิกึมจะสร้างรายได้หรือรับประกันผลกำไร มีความเสี่ยงที่อาจเกิดขึ้นจากการซื้อขายสัญญาซื้อขายล่วงหน้าและซื้อขายแลกเปลี่ยน การซื้อขายสัญญาซื้อขายล่วงหน้าและการซื้อขายแลกเปลี่ยนเงินตราต่างประเทศเกี่ยวข้องกับความเสี่ยงที่สำคัญของการสูญเสียและไม่เหมาะสำหรับทุกคน ผลลัพธ์เหล่านี้ขึ้นอยู่กับผลการปฏิบัติงานจำลองหรือสมมุติฐานที่มีข้อ จำกัด บางประการ ผลการค้นหาเหล่านี้ไม่ได้แสดงถึงการซื้อขายจริง นอกจากนี้เนื่องจากธุรกิจการค้าเหล่านี้ไม่ได้รับการดำเนินการจริงผลลัพธ์เหล่านี้อาจได้รับผลกระทบต่ำกว่าหรือมากกว่าที่ชดเชยสำหรับผลกระทบหากมีปัจจัยทางการตลาดบางอย่างเช่นการขาดสภาพคล่อง โปรแกรมการค้าจำลองหรือสมมุติโดยทั่วไปยังขึ้นอยู่กับข้อเท็จจริงที่ว่าพวกเขาได้รับการออกแบบมาเพื่อประโยชน์ในการมองย้อนกลับ ไม่ได้มีการระบุว่าบัญชีใด ๆ จะเป็นไปได้หรือมีแนวโน้มที่จะบรรลุผลกำไรหรือขาดทุนเช่นเดียวกับที่แสดง ข้อมูลในเว็บไซต์นี้จัดทำขึ้นโดยไม่คำนึงถึงวัตถุประสงค์ในการลงทุนสถานการณ์ทางการเงินและความต้องการของนักลงทุนรายใดและแนะนำให้ผู้ใช้บริการไม่ดำเนินการใด ๆ โดยไม่ได้รับคำแนะนำจากที่ปรึกษาทางการเงินของตนโดยไม่ต้องอาศัยข้อมูลจากเว็บไซต์เป็นพื้นฐานหลัก สำหรับการตัดสินใจลงทุนของพวกเขาและเพื่อพิจารณาความเสี่ยงของตัวเองความอดทนความเสี่ยงและการสูญเสียหยุดของตัวเอง - powered by Enfold WordPress Theme

No comments:

Post a Comment