Wednesday 10 May 2017

C # Trading System Tutorial


Trading Systems Entwerfen Ihres Systems - Teil 1. Der vorhergehende Abschnitt dieses Tutorials betrachtete die Elemente, die ein Handelssystem bilden und diskutierten die Vor - und Nachteile der Verwendung eines solchen Systems in einem Live-Handelsumfeld. In diesem Abschnitt bauen wir auf diesem Wissen auf Indem sie untersuchen, welche Märkte sich besonders gut für den Systemhandel eignen, werden wir dann die verschiedenen Gattungen der Handelssysteme genauer betrachten. Wiederholen in den verschiedenen Märkten. Equity-Märkte Der Aktienmarkt ist wahrscheinlich der häufigste Markt für den Handel, Vor allem bei den Anfängern In dieser Arena dominieren große Akteure wie Warren Buffett und Merrill Lynch, und traditionelle Wert - und Wachstumsinvestitionsstrategien sind bei weitem am häufigsten. Trotzdem haben viele Institutionen deutlich in die Gestaltung, Entwicklung und Umsetzung von Handelssystemen investiert. Individuelle Investoren Treten diesem Trend bei, obwohl langsam. Hier sind einige Schlüsselfaktoren zu beachten bei der Verwendung von Handelssystemen in Aktienmärkten. Die große Menge an Aktien zur Verfügung stellt Trader, um Systeme auf viele verschiedene Arten von Aktien zu testen - alles von extrem volatilen über-die - OTC-Bestände an nicht-flüchtige Blue-Chips. Die Effektivität von Handelssystemen kann durch die geringe Liquidität einiger Aktien begrenzt werden, insbesondere OTC - und Pink-Sheet-Emissionen können in Gewinne aus erfolgreichen Geschäften einfließen und können Verluste OTC und Pink Sheet erhöhen Aktien werden oft zusätzliche Provisionsgebühren erhoben. Die wichtigsten Handelssysteme sind diejenigen, die nach Wert suchen - das heißt, Systeme, die unterschiedliche Parameter verwenden, um festzustellen, ob eine Sicherheit im Vergleich zu ihrer bisherigen Leistung, ihren Kollegen oder dem Markt im Allgemeinen unterbewertet ist Exchange-Märkte Der Devisenmarkt oder Forex ist der größte und liquideste Markt der Welt Die Welt Regierungen, Banken und anderen großen Institutionen Handel Billionen Dollar auf dem Forex-Markt jeden Tag Die Mehrheit der institutionellen Händler auf dem Forex verlassen sich auf den Handel Systeme Das gleiche gilt für Einzelpersonen auf dem Forex, aber einige Handel auf der Grundlage von Wirtschaftsberichten oder Zinsauszahlungen. Hier sind einige Schlüsselfaktoren zu beachten bei der Verwendung von Handelssystemen im Forex-Markt. Die Liquidität in diesem Markt - aufgrund der riesigen Volumen - macht Handelssysteme genauer und effektiver. Es gibt keine Provisionen in diesem Markt, nur Spreads Daher ist es viel einfacher, viele Transaktionen ohne Erhöhung der Kosten für die Höhe der Aktien oder Rohstoffe zur Verfügung gestellt, die Anzahl der Währungen zu handeln ist begrenzt Wegen der Verfügbarkeit von exotischen Währungspaaren - also Währungen aus kleineren Ländern - ist die Bandbreite in Bezug auf die Volatilität nicht unbedingt begrenzt. Die wichtigsten Handelssysteme, die in Forex verwendet werden, sind diejenigen, die den Trends folgen, ein populäres Sprichwort auf dem Markt ist der Trend ist Ihr Freund oder Systeme, die kaufen oder verkaufen auf Ausbrüche Dies ist, weil ökonomische Indikatoren oft große Preisbewegungen auf einmal verursachen. Futures Equity, Forex und Rohstoffmärkte alle bieten Futures-Handel Dies ist ein beliebtes Fahrzeug für den Systemhandel wegen der höheren Menge Der vorhandenen Hebelwirkung und der erhöhten Liquidität und Volatilität Allerdings können diese Faktoren auf beide Weisen schneiden, wie sie entweder Ihre Gewinne verstärken oder Ihre Verluste verstärken können. Aus diesem Grund ist die Verwendung von Futures in der Regel für fortgeschrittene Einzel - und institutionelle Systemhändler reserviert. Dies ist, weil Handelssysteme Fähig, auf dem Futures-Markt zu profitieren, erfordern viel größere Anpassungen, nutzen fortgeschrittene Indikatoren und dauert viel länger, um zu entwickeln So, Welches ist das Beste Es ist bis zu dem einzelnen Investor zu entscheiden, welcher Markt am besten für den Systemhandel geeignet ist - jeder hat seine eigenen Vorteile Und Nachteile Die meisten Menschen sind mehr vertraut mit den Aktienmärkten, und diese Vertrautheit macht die Entwicklung eines Handelssystems einfacher Allerdings ist Forex üblicherweise die überlegene Plattform, um Handelssysteme laufen - vor allem bei erfahrenen Händlern Darüber hinaus, wenn ein Händler entscheidet, zu profitieren Auf erhöhte Hebelwirkung und Volatilität, die Futures-Alternative ist immer offen Letztendlich liegt die Wahl in den Händen des Systementwicklers. Typen von Trading Systems. Trend-Following Systems Die häufigste Methode des Systemhandels ist das Trend-Nachfolgesystem Fundamentale Form, dieses System wartet nur auf eine signifikante Preisbewegung, dann kauft oder verkauft in dieser Richtung Diese Art von Systembanken auf die Hoffnung, dass diese Preisbewegungen den Trend beibehalten werden. Moving Average Systems Häufig in der technischen Analyse verwendet ein gleitender Durchschnitt ist ein Indikator, der einfach den durchschnittlichen Preis eines Bestandes über einen Zeitraum zeigt Die Essenz der Trends wird aus dieser Messung abgeleitet Die häufigste Art der Bestimmung von Ein-und Ausreise ist ein Crossover Die Logik dahinter ist einfach ein neuer Trend wird festgestellt, wenn der Preis sinkt Über oder unter seinem historischen Preis Durchschnitt Trend Hier ist ein Diagramm, das sowohl die Preis blaue Linie und die 20-Tage-MA rote Linie von IBM. Breakout-Systeme Das grundlegende Konzept hinter dieser Art von System ist ähnlich wie bei einem gleitenden durchschnittlichen System Die Idee ist, dass, wenn ein neues hoch oder niedrig ist, die Preisbewegung am ehesten in Richtung des Ausbruchs fortsetzen wird Ein Indikator, der bei der Bestimmung von Ausbrüchen verwendet werden kann, ist eine einfache Bollinger Band Overlay Bollinger Bands zeigen Durchschnittswerte von hohen und niedrigen Preisen , Und Ausbrüche auftreten, wenn der Preis trifft die Kanten der Bands Hier ist ein Diagramm, das Preis blaue Linie und Bollinger Bands grauen Linien von Microsoft. Disadvantages von Trend-Following Systems. Empirische Entscheidung-Making Required - Bei der Bestimmung Trends gibt es immer ein Empirisches Element, um die Dauer der historischen Tendenz zu betrachten Zum Beispiel könnte der gleitende Durchschnitt für die letzten 20 Tage oder für die letzten fünf Jahre sein, so dass der Entwickler bestimmen muss, welche am besten für das System ist Andere Faktoren, die bestimmt werden sollen, sind der Durchschnitt Höhen und Tiefen in Breakout-Systemen. Lagging Nature - Moving Mittelwerte und Breakout-Systeme werden immer zurückbleiben Mit anderen Worten, sie können niemals die genaue Top - oder Bottom-of-Trend beeinflussen Dies führt zwangsläufig zu einem Verfall von potenziellen Gewinnen, die manchmal erheblich sein können. Wechselliche Wirkung - Unter den Marktkräften, die für den Erfolg von Trendfolgesystemen schädlich sind, gehört dies zu den häufigsten Die Whipswirkung tritt auf, wenn der gleitende Durchschnitt ein falsches Signal erzeugt - das heißt, wenn der Durchschnitt nur in Reichweite fällt , Dann plötzlich umgekehrt Richtung Dies kann zu massiven Verlusten führen, es sei denn, effektive Stop-Losses und Risikomanagement-Techniken eingesetzt werden. Sideways Märkte - Trend-Follow-Systeme sind von Natur aus in der Lage, Geld zu verdienen nur in Märkten, die tatsächlich Trend Aber auch Märkte Bewegte sich seitwärts in einem bestimmten Bereich für einen längeren Zeitraum. Extreme Volatility Mai auftreten - Gelegentlich können Trend-Follow-Systeme einige extreme Volatilität erleben, aber der Trader muss mit seinem System bleiben Die Unfähigkeit, dies zu tun, wird sichergestellt Failure. Countertrend Systems Grundsätzlich ist das Ziel mit dem Countertrend-System, bei dem niedrigsten Tief zu kaufen und am höchsten zu verkaufen. Der Hauptunterschied zwischen diesem und dem Trendfolgesystem besteht darin, dass das Gegensprechsystem nicht selbstkorrigiert ist. Mit anderen Worten, Es gibt keine festgelegte Zeit, um Positionen zu verlassen, und dies führt zu einem unbegrenzten Abwärtspotenzial Arten von Countertrend-Systemen Viele verschiedene Arten von Systemen gelten als Gegensprechsysteme Die Idee hier ist zu kaufen, wenn Impuls in einer Richtung beginnt zu verblassen Dies wird am häufigsten mit Oszillatoren berechnet Zum Beispiel kann ein Signal erzeugt werden, wenn Stochastik oder andere relative Stärke Indikatoren unter bestimmte Punkte fallen Es gibt andere Arten von Countertrend Trading-Systeme, aber alle von ihnen teilen sich das gleiche grundlegende Ziel - zu kaufen niedrig und verkaufen hoch. Die Vorteile von Countertrend Following Systems. E Mpirische Entscheidungsfindung erforderlich - Zum Beispiel ist einer der Faktoren, die der Systementwickler entscheiden muss, die Punkte, an denen die relativen Stärkeindikatoren verblassen werden. Extreme Volatilität kann auftreten - Diese Systeme können auch einige extreme Volatilität und eine Unfähigkeit zu erleben Stick mit dem System trotz dieser Volatilität wird zu einem versicherten Ausfall führen. Unlimited Downside - Wie bereits erwähnt, gibt es unbegrenzte Abwärtspotenzial, weil das System ist nicht selbstkorrigiert gibt es keine festgelegte Zeit, um Positionen zu verlassen. Conclusion Die wichtigsten Märkte für die Handelssysteme Sind geeignet, die Aktien-, Devisen - und Futures-Märkte Jeder dieser Märkte hat seine Vor - und Nachteile Die beiden Hauptgenres der Handelssysteme sind die Trendfolgen und die Gegensprechsysteme Trotz ihrer Unterschiede erfordern beide Arten von Systemen in ihren Entwicklungsstadien Empirische Entscheidungsfindung seitens des Entwicklers Auch diese Systeme unterliegen einer extremen Volatilität, und dies kann eine gewisse Ausdauer erfordern - es ist wichtig, dass der Systemhändler während dieser Zeiten mit seinem System zusammenhängt. In der folgenden Tranche nehmen wir eine Genauer zu betrachten, wie man ein Trading-System entwerfen und diskutieren einige der Software, die System-Händler verwenden, um ihr Leben leichter machen. Short Antwort Intro zu Algorithmic Trading mit Heikin-Ashi Kurzer Führer, der Sie von Anfänger zu fast Quantität bringt Es bietet eine kostenlose Entwicklung Umwelt, zeigt, wie man einen technischen Indikator zu bauen, und wie man eine automatisierte Handelsstrategie erstellen In diesem Quora Post habe ich einen größeren Zusammenbruch, wie man anfängt. Längerliche Antwort Um wirklich in der Entwicklung von algorithmischen Handelsstrategien zu werden, benötigen Sie etwas Hintergrund Wissen Dies kann im Laufe der Zeit abgeholt werden und es ist nicht entscheidend, dass alle Marktkenntnisse beherrscht werden, bevor wir loslegen. Learning the Markets. There sind Tonnen von Ressourcen für diese, und das ist genau das, warum Sie sollten ein bisschen vorsichtig, was Bücher Sie Wählen Sie ab, um zu lesen und zu lesen Ajusal s Antwort hat einen Zusammenbruch von einigen großen Buchse Into My Trading Room von Alexander Eldar - Fantastisches erstes Buch für jedermann neu zu handeln Dr. Alexander Elder überbrückt die Lücke zwischen den Marktgrundlagen und profitabel von der Ausnutzung der technischen Indikatoren. Zusätzlich , Hier ist eine aggregierte Leseliste PDF mit einem vollständigen Ausfall von Büchern, Videos, Kursen und Trading-Foren. Learn to Program. Ich empfehle Python oder MATLAB, obwohl wohl Python ist vielseitiger MATLAB ist sehr mächtig und von quanten Läden für die Forschung verwendet Und Entwicklung von Handelsstrategien Auch wenn Sie aus irgendeiner Art von Akademie kommen, haben Sie wahrscheinlich bereits Exposition gegenüber MATLAB. Learn Python - Ein interaktives Python Tutorial für jedermann gedacht, um die Programmiersprache zu lernen Live Beispiele von Code können ausgeführt werden und getestet rechts in Ihr Browser. MATLAB Kurzanleitung - Schnelle und gründliche Online-Einführung in MATLAB mit vielen Codebeispielen, um Ihren Standpunkt zu erhalten Die meisten intuitiven und unkomplizierten MATLAB Intro available. Get eine Trading Platform. I m voreingenommen und ich empfehle Quantiacs, es ist eine kostenlose Open - Quellplattform für Python und MATLAB mit historischen Daten Das unten aufgeführte Tutorial geht davon aus, dass du Quantiacs einsetzen wirst und dafür Code zur Verfügung stellt, aber die gelernten Lektionen sollten auch auf jede andere Plattform angewendet werden. Erste Dinge, die du zuerst benötigst Um die Quantiacs Toolbox zu installieren Dies ist ein relativ einfacher Prozess, der nur ein paar Minuten dauern soll. Du hast die Möglichkeit, Python oder MATLAB zu verwenden, und wenn du nicht schon stark in nur eins investiert hast, empfehle ich das Herunterladen und Installieren von Go Installiere die Toolbox. Intro Auf die Quantiacs Toolbox. Sehen Sie sich die Struktur eines Beispiel Trading-System hier in Python und hier in MATLAB Die wichtigsten Komponenten eines Quantiacs-Algorithmus sind die Einstellungen, Märkte und Positionen Für MATLAB und Python, Ihr Trading-Algorithmus lebt nur in Eine Datei, die dieser allgemeinen Vorlage folgt Für einen Zusammenbruch der Toolbox besuchen Sie hier Erfahren Sie mehr über die Toolbox hier sollte ziemlich einfach sein. Dieser Quora Post 1 hat eine eingehende Aufschlüsselung aller Best Practices für die tatsächliche Prüfung Ihrer Algorithmus nach und während der Entwicklung Anregungen beinhalten die Verwendung von Walk-Forward-Analysen, In-Sample - und Out-of-Sample-Tests und wie man die Performance im Allgemeinen messen kann. In diesem Quora-Post 2 habe ich einige der Herausforderungen aufgeschrieben, denen Sie bei der Erstellung automatisierter Handelssysteme gegenüberstehen, die im Allgemeinen nicht explizit sind Bekannt, bis Sie anfangen Diejenigen, die sicherstellen, Rand, wie Faktor in Kapital und Handelskosten, und wie man nicht durch den Profis Handel gegen Sie zerstört werden. Die Gefahren der Kurve Fitting. Just eine Nebennote, um über die gemeinsame Fallstricke von quant Strategieentwicklung ist Überfüllung Eine Kurvenanpassungsstrategie ist eine, die so gut optimiert wurde, sie passt perfekt zur vergangenen Performance der Märkte. Das Endergebnis ist, dass es bei zukünftigen Preispreis und Marktereignissen völlig ausfallen wird. Overfitting wird zu einem fantastischen Backtesting von unrealistischen Ergebnissen führen Und unrentable Handelsstrategien. Es geht in der Regel um wechselnde Parameter wie die Periode eines gleitenden Durchschnittes, bis die Trading-Algorithmus s Leistung deutlich verbessert Während die Optimierung der Strategien an sich ist eine gültige Praxis, muss es sorgfältig durchgeführt werden, um Überzuführung zu vermeiden. Hier s Welche Überfüllung kann es tun - es kann diese unrentable Handelsstrategie nehmen. Und machen es zu einem erstaunlichen ein. Diese optimierte Strategie würde niemals in der realen Welt arbeiten. Wenn das Startdatum des Backtests um ein paar Jahre verschoben wird, ist der wahrgenommene Markt Rand verdampft Willkürlich Jagd auf gute Backtesting Ergebnisse ist eine gefährliche Praxis und gewann t produzieren wirklich profitable Strategien. Haftungsausschluss Ich arbeite bei Quantiacs. Once Sie bereit, um Geld als Quant zu verdienen, können Sie die neuesten Quantiacs automatisierten Handelswettbewerb beitreten, mit insgesamt 2,250.000 in Investitionen verfügbar Können Sie mit den besten Quants konkurrieren.14 6k Views View Upvotes Nicht für Reproduktion. Meine Reise als Quant hat mich dazu veranlasst, eine riesige Anzahl von Büchern zu lesen, die zu diesem Thema verfügbar sind. Ich bin gekommen, das zu finden, während es viele gute Bücher gibt, die Ihnen helfen, nützliche Informationen zu gewinnen, es gibt noch mehr Bücher Das sind nur reine spielen Marketing-Material schob die Kehlen der unwissenden Leser. Below sind meine Empfehlungen von Büchern, kategorisiert auf der Grundlage von verschiedenen Aspekten des Unternehmens, die Sie vielleicht interessiert in Verständnis. Basics Für den Laien, der neu in diesem Bereich ist und Will einen Headstart 1 Innerhalb der Black Box von Rishi Narang - Großes Buch für einen Headstart auf alle verschiedenen Aspekte des Quellhandels Sehr allgemeine Informationen, aber breit bürstet durch jeden Aspekt des Unternehmens 2 Quantitative Trading von Ernie Chan - Perfektes Buch, um loszulegen Auf alle grundlegenden Konzepte mit Details zum Backtesting und einige einfache Strategien, um loszulegen mit. Programming Depends, welche Plattform Sie verwenden möchten Es gibt Tonnen von Büchern und Online-Tutorials auf jeder Programmiersprache I d empfehlen, die folgenden auf Python und Java 1 Lernpython von Mark Lutz - Covers Grundlagen der Pythonschlange Gut, um dich zu starten 2 Head First Java von Kathy Sierra - Großes Buch über JAVA, direkt von den Grundlagen bis zum Fortgeschrittenen. Market Mikrostruktur Bevor du etwas über Algo-Strategien lernst, ist es am wichtigsten Verstehen, wie der Handel funktioniert und wie die verschiedenen Stakeholder miteinander interagieren, um einen Markt zu schaffen Handel und Austausch von Larry Harris - Covers Markt Mikrostruktur in Grab Tiefe A muss vor dem Tauchen in Strategien lesen, um ein gutes Verständnis der Märkte zu bekommen. Strategien Gute Bücher auf Strategien der vielfältigen Natur Momentum, Trend Following, Paar Trading, Griechen usw. Ich habe auch diese Bücher auf der Grundlage der Art von Strategien, dass die Bücher konzentrieren sich auf 1 Algorithmic Trading von Ernie Chan - ein erweiterter Buch von Ernie, mit einer Reihe von interessanten Strategien zum Ausprobieren und Backtest Viele gute Theorie, die die grundlegenden Konzepte hinter der Existenz verschiedener Arten von Marktbehaarungen erklären und wie man sie einfängt 2 Mechanische Handelssysteme von Richard Weissman - Großes Buch für Strategien Umfasst eine Fülle von Impulse und mittlere Reversionsstrategien Mehrere Zeitrahmen, zusammen mit rückversetzten Ergebnissen 3 Nach dem Trend von Andreas Clenow - ich betrachte dieses Buch, eines der besten Lesungen zum Thema Trendfolgen, eine sehr beliebte Handelsstrategie 4 Pairs Trading von Ganapathy Vidyamurthy - Sehr gutes Buch auf einem Beliebte Trading-Strategie bekannt als Pairs Trading 5 Wie man Geld in Aktien von William O Neil - Ein ausgezeichnetes Lesen auf eine sehr interessante Grundlagen basierte Quant-Modell, genannt CANSLIM. Options Strategies Ich decke Optionen Strategien unter einem anderen Thema, wenn man bedenkt, dass sie viel sind Komplexer im Vergleich zu Aktien Futures 1 Optionen Volatilität und Preisgestaltung von Sheldon Natenberg - Eines der besten Bücher über Optionen für einen Begginer, arbeiten Sie sich von den Grundlagen bis hin zu den griechischen und Volatilität Trading 2 Die Bibel der Optionen Strategien von Guy Cohen - Gutes Buch, um die Geschwindigkeit auf alle verschiedenen Optionen Setups und ihre spezifischen griechischen 3 Volatility Trading von Euan Sinclair - Sehr fortgeschrittene und ausführliche Buch über das Konzept der Volatility Trading Ich glaube, es ist das Beste zu diesem Thema. Risk Management Der wichtigste Aspekt des Quellhandels, der oft übersehen wird Position Sizing von Van Tharp - Ein Juwel von einem Buch, das die Idee des Risikomanagements und des Geldmanagements mit verschiedenen Techniken erklärt. Mein Rat an einen angehenden Algo-Trader wäre, um gründlich zu erforschen Leben mit einer Strategie Betrachten Sie sich ein Risikomanager anstatt ein Geld-Manager Managing Risiko kommt zuerst, dann kommen returns.23 5k Views View Upvotes Nicht für Reproduction. Full Disclaimer Ich bin nicht ein Quant oder Algo Trader mich selbst habe ich nur eine Menge geholfen Leute, um besser zu werden bei Algo Trading Client-Ingenieur bei Quantopian Hier sa einige Dinge, die ich je von meiner Erfahrung gesehen habe. Read Hier sind zwei Bücher, die ich gesehen habe, eine Menge, die ich Ihnen den Titel und den Grund, warum. Algorithmische Trading Winning Strategies Und ihre Begründung von Ernie Chan deckt das ganze Erdgeschoss von Anfang an zu den fortgeschrittenen algorithmischen Strategien buchstäblich, es wird Sie von Ich habe keine Ahnung, welche Art von Strategie ich verwenden könnte Okay, ich habe die Wahl zwischen Impuls, Paar Handel , Mittlere Reversionsstrategien, die für mein Portfolio und meine Ziele am besten geeignet sind, ich bin kein Scherz, das ist ein gutes Einführungsbuch und die Bibliographie wird dich dorthin bringen, wo du gehen musst. Python Für die Datenanalyse Dies ist weniger spezifisch für den Algo-Handel Ich vermute, du wirst irgendeine Art von Code-basierten System und ehrlich zu verwenden, ist Python der einfachste und einfachste Weg zu gehen. Starten Üben Die besten Algo-Händler, die ich gesehen habe, sind diejenigen, die eine Menge und eine Menge von Algorithmen erstellt haben Basteln, Versuchen, Versagen Dies sind alles, was Ihnen hilft, Ihre Strategien von der Kindheit bis zu möglichen Alpha-Generator-Systemen zu produzieren. Ich kenne hauptsächlich zwei Quellen, wo die Leute ihre Praxis noch einmal bekommen. Ich arbeite bei Quantopian. Zipline, einer offenen Python-Algorithmik Trading-Bibliothek, die jeder nutzen kann Es macht auch die Backtester-Engine hinter Quantopian, die führt mich zu meinem nächsten Punkt. Quantopian, die die Plattform, Daten und IDE bietet für Sie, um Ihre Strategien in Python zu testen und führen Sie es mit echtem Geld, wenn Sie denken Sie haben etwas Nachteil ist, dass Sie die quantopischen spezifischen API-Methoden lernen müssen Opside ist, dass es nicht viel zu lernen und es gibt eine Tonne von Tutorials, um Ihnen durch it. Put Ihr Geld dahinter Nehmen Sie kleine Summen und tatsächlich setzen Irgendeine Haut im Spiel Backtesting und so ist gut, aber du wirst anders denken, sobald du etwas hast zu verlieren Feynman hat ein gutes Zitat auf diesem. Ich könnte das machen, aber ich habe gewonnen, was genau so ist, das zu sagen Sie können t - Nur sagen, Ihr Algorithmus kann Geld verdienen ist anders als es tatsächlich Geld verdienen. So, wenn Sie scheitern, lernen Sie daraus und wiederholen Sie den Prozess Wenn Sie gewinnen, seien Sie vorsichtig, dass eines Tages könnten Sie fehlschlagen. - Nur ein paar Beobachtungen aus Sehen die Leute gehen durch den Prozess immer und immer wieder.18 5k Views View Upvotes Nicht für Reproduction. Justin Medlin Systematische Trader, Gründungsmitglied von. Ich schätze die A2A, das Timing ist zufällig. Wir engagieren sich in einer wahrscheinlichen einmaligen Strategie Creation Collaboration Project Beginn 1. April 2017, und immer noch Slots offen Es ist völlig kostenlos, und wird Sie durch die Einrichtung einer Trading-Plattform und Daten-Feed, wenn Sie Port t bereits getan, und dann gehen Sie durch den gesamten Prozess von Automated Trading Strategie-Kreation, von Anfang bis Ende, in einer kollaborativen Weise. Wir werden die Teilnehmer mit Werkzeugen, die sie verwenden können, um zu helfen, die vorteilhaftesten Eintrag Exit-Bedingungen aufzudecken, und wird die Auswahl der optimalen dieser Benutzer Einreichungen in jeder Phase auf dem Weg , Um eine robuste und voll funktionsfähige Handelsstrategie von Grund auf zu schaffen, die dann an alle Teilnehmer verteilt wird, auch diejenigen, die am Rande sitzen und am Ende des Prozesses beobachten, die sie nutzen können, um in Echtzeit zu handeln Über eine Simulation Trading Account bitte, nicht leben Geld. Mehr wichtiger ist, können die Benutzer in der Lage, Fragen zu stellen und erhalten Antworten, wie wir von der Entwicklung bis zur Entwicklungsphase gehen, für alle zu sehen Unsere Hoffnung ist, dies zu einem äußerst effizienten Lernprozess zu machen Für alle Beteiligten und wer weiß, können wir sogar eine gewisse Kraft in der kollaborativen Kraft der Vielfalt der Köpfe und der kollektiven Rechenleistung finden und etwas eindrucksvolles schaffen. Einer der Gründe, warum wir das tun, ist, weil wir uns nichts bewusst sind Sonst da draußen, die alle Basen abdeckt, zumindest ohne dich aufzuladen, aber ich schlage vor, einen Blick auf Denis Post für eine umfassendere Liste von dem, was derzeit da draußen ist, bewundernswert kompiliert. Ich empfehle auch, eine Qualität zu finden Diskussionsforum, obwohl sie scheinen, kurz zu sein, ich bin ein Fan von Futures io, wie es scheint, ziemlich aktiv zu sein, und haben eine relativ kompetente beitragende Benutzerbasis, fast alle von denen sind freundlich, geduldig, hilfreich. Ein Denis erwähnt in seinem Antwort, es ist der Hintergrund Wissen Kontext, dass alle wichtigen, und die einzige Möglichkeit, dies zu kultivieren ist eine Kombination von bewussten Praxis und Zeit, so dass ich stark empfehlen, nur Tauchen in eine Plattform Ninjatrader kann intuitiver sein, MatLab mächtiger, und Ich glaube, Quantiacs ist in seinen frühen Stadien, aber mit einer hellen Zukunft fast jede beliebte Plattform wird tun, für die frühen Stadien und immer Ihre Hände schmutzig, werden Sie staunen, wie viel Sie aus einem solchen Prozess zu lesen, und wie schnell die Wertvoller Kontext beginnt zu bauen. Ich finde, wenn der Prozess echt interessant ist und mit Ihnen in Resonanz ist, kann man aber helfen, tiefer zu graben und mehr zu lernen, organisch wird es nicht mehr zum lästigen, oder am wenigsten mühsamen, sondern etwas intellektuell lohnenden Und faszinierend und von dort aus, ist das Lernen einfach.255 Views View Upvotes Nicht für Reproduktion. Hier ist die Buchliste. Dieses Buch skizzieren den vollen Zyklus von der Validierung einer Trading-Idee, Testen, Messen, Optimierung von Handelsstrategien. Es enthält Lose Von großartigen Ideen und Zeigern auf jeden einzelnen Schritt in den Prozess. Ich wünschte, ich habe das Buch viel früher gelesen, da ist schon ein paar Augenblicke, dass ich dort etwas gelesen habe, von dem ich dachte, dass ich mich selbst erschaffen habe und dann gibt es noch ein paar Fortgeschrittene Ich habe niemals darüber geschrieben. Dies ist eines der ersten Bücher, die ich auf den Themen gelesen habe, die einfach genug ist zu verstehen und es bedeckt die wichtigsten Punkte Sehr gut einleitend. Ich lese dieses Buch vor kurzem, nachdem ich folge Ernie in Quora, um ehrlich zu sein, ich habe das ganze Buch nicht gelesen, aber ich habe diese Themen ausgewählt, die ich interessiert habe. Es ist eine gute Ergänzung zu den obigen zwei Büchern, was einige Themen besser erklärt als die beiden oben. Wenn du mehr über bestimmte Themen wissen willst In algorithmischen Handel, meine Erfahrung ist, dass Sie ve zu lesen, mehrere Bücher von verschiedenen Autor auch auf das gleiche Thema Es gibt kein einziges Buch, das alles abdecken, aber jedes Buch geben Ihnen etwas. Ich habe eine längere Buchliste ausstehende Schreiben, aber ich Denke, die oben genannten drei sollte mehr als genug für Sie zu beginnen. Just wollen hinzufügen, gibt es einige Websites und Bücher zu diesen Themen tatsächlich wollen Sie verkaufen Dienstleistungen oder Software, der Inhalt dieser Buch sind eigentlich nur Marketing-Material Aber die Bücher, die ich oben aufgeführt habe, sind wirklich pädagogisch Der Autor sind so toll, dass Qualität Material auf das Buch gesetzt.3 6k Views View Upvotes Nicht für Reproduktion. Ich würde empfehlen, beginnend mit den grundlegenden Konzepten der technischen Analyse Einige Bücher, die ich gefunden habe hilfreich in der Nach dem Auftrag in meinen Handelsraum Ein kompletter Führer zum Handel von Alexander Elder - Geeignet als erstes Buch für jedermann völlig neu zum Handel. Technische Analyse der Finanzmärkte Ein umfassender Leitfaden für Handelsmethoden und Anwendungen von John J Murphy - stellt den Leser vor Eine breite Palette von Techniken, die in der technischen Analyse verwendet werden, ein guter Ausgangspunkt, bevor Sie weitere Richtung wählen. Auf der Programmierseite. Ich würde empfehlen, mit einer Plattform zu beginnen, wo der Händler verschiedene Strategien in einer vorgesehenen Umgebung implementieren kann. Solche Plattformen sind TradeStation oder NinjaTrader für Beispiel Diese Plattformen haben viele eingebaute Features zum Beispiel Charting, Broker-Verbindungen usw., so dass sie relativ einfach zu erlernen und bequem zu bedienen sind. Wenn jemand auf diese Ebene gekommen ist, dann glaube ich, dass er bereits entscheiden kann, ob der Handel für ihn ist Oder nicht und wenn ja dann welche Richtung er beabsichtigt zu nehmen. Weiterhin wird es notwendig sein, dass der Händler gründlich studiert und eine Programmiersprache Eg C, C, C oder Java benutzt, um ein paar zu nennen. Dann wird es notwendig sein, zu etablieren Eine eigene Handelsmethodik und - ansatz, welche Techniken zu verwenden, wie man sie benutzt und wie man sie weiter voran zu verbessern ist. Dies ist ein breites und komplexes Thema und alle verschiedenen Techniken können nicht in einem einzigen Führer aufgenommen werden Jemand ist definitiv auf der Suche nach einem Ein-Buch-Guide, können sie versuchen, auf Amazon zu gehen und geben algorithmischen Handel in der Suche Dies wird bringen ein paar Bücher gewidmet dem Thema habe ich noch nie gelesen, von diesen, aber so weit wie ich Erinnern Sie sich, auf der Grundlage der Bewertungen, einige von ihnen stellen eine bestimmte Methode und führen Sie durch Schritt für Schritt, wie es zu implementieren. Unabhängig davon, welche Route Sie nehmen, vorbereitet werden, dass am Ende müssen Sie Ihre eigene Forschung zu tun, implementieren Sie Ihre Eigene Ideen und legte in die zusätzliche Arbeit, die es braucht, um ein erfolgreicher Trader.16 1k Views View Upvotes Nicht für Reproduction. I wird Ihnen helfen, verstehen Sie die Grundlagen der Algorithmic Trading, seine Vorteile im Vergleich zu manuellen Handel und einige der gemeinsamen Mythen Assoziiert mit Algorithmic Trading Lesen Sie durch unten. Was ist Algorithmic Trading. Algorithmischen Trading ist ein Prozess zu kaufen oder verkaufen eine Sicherheit auf der Grundlage einiger vordefinierten Satz von Regeln, die auf historische Daten zurückgesetzt werden Diese Regeln können auf technische Analyse, Charts, Indikatoren oder sogar Stock Fundamentaldaten Zum Beispiel, nehmen Sie an, Sie haben einen Handelsplan, dass Sie eine bestimmte Aktie kaufen würde, wenn es in Red für 5 aufeinanderfolgende Tage schließt Sie können diese Regel in Algorithmic Trading-System zu formulieren und sogar automatisieren, so dass Bestell-Bestellung automatisch platziert wird Wenn Ihr Zustand erfüllt ist Sie können sogar definieren Sie Ihre Stoploss, Ziel-und Positions-Sizing in den Algorithmus, die Ihr Trading-Leben einfacher machen würde. Isgorithmische Trading Vorteile. Es s sagte, dass Ihr Erfolg im Handel hängt von 30 Marktanalyse, 30 Risikomanagement, 30 Emotionskontrolle und 10 Glück Wenn wir Glück beiseite legen, dann können Algorithmische Systeme auf die Ruhe kümmern 90 Die meisten Trader scheitern, wenn Emotionen in ihre Handelsentscheidungen eingreifen Auch die erfahrenen Händler Panik beim Drücken von Buy Sell Button, die schließlich zum Verlust führt Auch Traders Neigen dazu, Stoploss oder Buchgewinne früh zu ignorieren, was wiederum ein Nachteil des manuellen Handels ist. Algorithmische Systeme kümmern sich um all diese Nachteile, die mit dem manuellen Handel verbunden sind. Auch wenn Sie mit Ihrem Tagesjob beschäftigt sind und keine Zeit zum Handel widmen können, dann können Sie einfach Automatisieren Sie Ihren Algorithmus, so dass Ihr Computer im Handel von Ihnen handeln kann. Legulmische Trading vs Manuelle Trading. Below Vergleichstabelle würde klar erklären, die Unterschiede zwischen Algorithmischen und manuellen Trading. Is Algorithmischen und automatisierten Handel ähnlich. Dies ist die häufigste Miss-Konzeption zugeordnet Mit Algorithmic Trading Algorithmic und Automated Trading sind nicht gleich Sie haben immer die Möglichkeit, Ihre Algorithmische Strategie zu automatisieren, aber es ist nicht notwendig Sie können sogar manuell durch die Signale, die durch Ihr Algorithmic System generiert werden, um Ihre Algorithmische Strategie zu automatisieren, müssen Sie eine Austausch-Genehmigung für Ihren Algorithmus Aber das ist kein schwieriger Prozess, bis Ihr Algorithmus ist fehlerfrei So das nächste Mal, wenn Sie über ein Algorithmic Trading-System kommen, nur einen Blick, ob es automatisiert oder manuell ist. Algorithmische Trading Beispiele. Bitte beziehen Sie sich die folgenden Links Für einige der profitable Algorithmische Setups Diese sind auf Amibroker oder Excel Sheet. Algorithmic Trading Myths. Below sind einige der häufigsten Mythen im Zusammenhang mit Algorithmic Trading. Algorithmischen Trading ist komplex und erfordert tiefe mathematische und statistische Kenntnisse. Nein, es ist nicht Sie können sogar Ihre einfachen Handelsregeln in Algorithmen umwandeln und durch sie handeln. Algorithmische Trading erfordert riesiges Kapital. No Sie können sogar sehr kleine Mengen mit Algorithmic Trading. Algorithmic Trading kaufen ist nicht für Einzelhändler. Es ist für alle Nur für den Fall, dass Sie wollen Um Ihren Algorithmus zu automatisieren, den Sie benötigen Dealer Terminal von Exchange. Algorithmischen Trading erfordert super schnelle Computer und Infrastruktur. Dies kann nur erforderlich sein, wenn Sie Hochfrequenz-Handel mit Algorithmen tun Für alles andere ist Ihr PC ausreichend.2 1k Views View Upvotes Nicht für Reproduktion. Software-Programmierer sind in der Lage, Vergütungen zu verdienen, die exponentiell höher sind als die ihrer anderen Berufe. Die Knappheit der technischen Kompetenz ist alarmierend und das Fehlen von Motivationsfaktoren ist noch höher Die Silberauskleidung dieser grauen Wolke ist auf die Tatsache beschränkt, dass dies bedeutet Dass Goliath-Unternehmen sind auf verzweifelte Prowl für effiziente Profis mit raffinierten Skill-Set. Wenn Sie auf der Suche nach kostenlosen Tutorials. With Gehälter, die überall zwischen Rs 111.389 den ganzen Weg bis zu Rs 722,959 kann man helfen, aber bewundern das Potenzial der Markt für Software-Programmierer und weiter analysieren die gleiche Analyse der Faktoren, die helfen, erleichtern den Übergang auf dem Markt der Software-Entwicklung, ist notwendig, zum Beispiel Werden Sie ein Master In BIG DATA Klicken Sie HIER. Ich muss alle potenziellen Kurse, die helfen wird, them approach a wide scope of career opportunities, therefore one must also admire the fact that, programming is the only way forward to develop ones portfolio and therefore further develop ones career. One must also entertain the possibility of taking on an entrepreneurial endeavor today millions of professional and graduates aim to make their way towards the freelance world The fiscal opportunities of which surpass even that of the full time professional contracts Even in consideration of non-technical enterprises, programmers are constantly finding opportunities in organizations that are updating and implementing state-of the art techniques in their operations. After considering this, one can t be oblivious to the benefits of the affiliations to any one of the decades and centuries old organizations, which command their own historical presence that provides an individual with a sense of belonging and enhances their importance The software programmers today are finding career opportunities in firms that are making transitions from traditional organizational cultures and environments to that of modernization and globalization This is the reason programmers are taking advance to refine and update their skill-sets In this scenario it is obvious that for programmers, it is and always will be a seller s market, with opportunities at their disposal.766 Views Not for Reproduction. 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 ie 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 kernal network 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 GUI IDE 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 NumPy pandas 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 NumPy SciPy for such computations A frequently rebalanced portfolio will require a compiled and well optimised matrix library to carry this step out, so as not to bottleneck the trading system. Risk management is another extremely important part of an algorithmic trading system Risk can come in many forms Increased volatility although this may be seen as desirable for certain strategies , increased correlations between asset classes , counter-party default, server outages, black swan events and undetected bugs in the trading code, to name a few. Risk management components try and anticipate the effects of excessive volatility and correlation between asset classes and their subsequent effect s on trading capital Often this reduces to a set of statistical computations such as Monte Carlo stress tests This is very similar to the computational needs of a derivatives pricing engine and as such will be CPU-bound These simulations are highly parallelisable see below and, to a certain degree, it is possible to throw hardware at the problem. 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 ie no GUI In the case of Interactive Brokers, the Trader WorkStation tool needs to be running in a GUI environment in order to access their API I once had to install a Desktop Ubuntu edition onto an Amazon cloud server to access Interactive Brokers remotely, purely for this reason. Most APIs will provide a C and or Java interface It is usually up to the community to develop language-specific wrappers for C , Python, R, Excel and MatLab Note that with every additional plugin utilised especially API wrappers there is scope for bugs to creep into the system Always test plugins of this sort and ensure they are actively maintained A worthwhile gauge is to see how many new updates to a codebase have been made in recent months. Execution frequency is of the utmost importance in the execution algorithm Note that hundreds of orders may be sent every minute and as such performance is critical Slippage will be incurred through a badly-performing execution system and this will have a dramatic impact on profitability. Statically-typed languages see below such as C Java are generally optimal for execution but there is a trade-off in development time, testing and ease of maintenance Dynamically-typed languages, such as Python and Perl are now generally fast enough Always make sure the components are designed in a modular fashion see below so that they can be swapped out out as the system scales. Architectural Planning and Development Process. The components of a trading system, its frequency and volume requirements have been discussed above, but system infrastructure has yet to be covered Those acting as a retail trader or working in a small fund will likely be wearing many hats It will be necessary to be covering the alpha model, risk management and execution parameters, and also the final implementation of the system Before delving into specific languages the design of an optimal system architecture will be discussed. Separation of Concerns. One of the most important decisions that must be made at the outset is how to separate the concerns of a trading system 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 TCP IP, ZeroMQ or some other language-independent protocol. As a concrete example, consider the case of a backtesting system being written in C for number crunching performance, while the portfolio manager and execution systems are written in Python using SciPy and IBPy. Performance Considerations. Performance is a significant consideration for most trading strategies For higher frequency strategies it is the most important factor Performance covers a wide range of issues, such as algorithmic execution speed, network latency, bandwidth, data IO, concurrency parallelism and scaling Each of these areas are individually covered by large textbooks, so this article will only scratch the surface of each topic Architecture and language choice will now be discussed in terms of their effects on performance. The prevailing wisdom as stated by Donald Knuth one of the fathers of Computer Science, is that premature optimisation is the root of all evil This is almost always the case - except when building a high frequency trading algorithm For those who are interested in lower frequency strategies, a common approach is to build a system in the simplest way possible and only optimise as bottlenecks begin to appear. Profiling tools are used to determine where bottlenecks arise Profiles can be made for all of the factors listed above, either in a MS Windows or Linux environment There are many operating system and language tools available to do so, as well as third party utilities Language choice will now be discussed in the context of performance. C , Java, Python, R and MatLab all contain high-performance libraries either as part of their standard or externally for basic data structure and algorithmic work C ships with the Standard Template Library, while Python contains NumPy SciPy Common mathematical tasks are to be found in these libraries and it is rarely beneficial to write a new implementation. One exception is if highly customised hardware architecture is required and an algorithm is making extensive use of proprietary extensions such as custom caches However, often reinvention of the wheel wastes time that could be better spent developing and optimising other parts of the trading infrastructure Development time is extremely precious especially in the context of sole developers. Latency is often an issue of the execution system as the research tools are usually situated on the same machine For the former, latency can occur at multiple points along the execution path Databases must be consulted disk network latency , signals must be generated operating syste, kernal messaging latency , trade signals sent NIC latency and orders processed exchange systems internal latency. For higher frequency operations it is necessary to become intimately familiar with kernal optimisation as well as optimisation of network transmission This is a deep area and is significantly beyond the scope of the article but if an UHFT algorithm is desired then be aware of the depth of knowledge required. Caching is very useful in the toolkit of a quantitative trading developer Caching refers to the concept of storing frequently accessed data in a manner which allows higher-performance access, at the expense of potential staleness of the data A common use case occurs in web development when taking data from a disk-backed relational database and putting it into memory Any subsequent requests for the data do not have to hit the database and so performance gains can be significant. For trading situations caching can be extremely beneficial For instance, the current state of a strategy portfolio can be stored in a cache until it is rebalanced, such that the list doesn t need to be regenerated upon each loop of the trading algorithm Such regeneration is likely to be a high CPU or disk 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 doesn t provide a native garbage collector and so it is necessary to handle all memory allocation deallocation as part of an object s implementation While potentially error prone potentially leading to dangling pointers it is extremely useful to have fine-grained control of how objects appear on the heap for certain applications When choosing a language make sure to study how the garbage collector works and whether it can be modified to optimise for a particular use case. Many operations in algorithmic trading systems are amenable to parallelisation This refers to the concept of carrying out multiple programmatic operations at the same time, ie in parallel So-called embarassingly parallel algorithms include steps that can be computed fully independently of other steps Certain statistical operations, such as Monte Carlo simulations, are a good example of embarassingly parallel algorithms as each random draw and subsequent path operation can be computed without knowledge of other paths. Other algorithms are only partially parallelisable Fluid dynamics simulations are such an example, where the domain of computation can be subdivided, but ultimately these domains must communicate with each other and thus the operations are partially sequential Parallelisable algorithms are subject to Amdahl s Law which provides a theoretical upper limit to the performance increase of a parallelised algorithm when subject to N separate processes eg on a CPU core or thread. Parallelisation has become increasingly important as a means of optimisation since processor clock-speeds have stagnated, as newer processors contain many cores with which to perform parallel calculations The rise of consumer graphics hardware predominently for video games has lead to the development of Graphical Processing Units GPUs , which contain hundreds of cores for highly concurrent operations Such GPUs are now very affordable High-level frameworks, such as Nvidia s CUDA have lead to widespread adoption in academia and finance. Such GPU hardware is generally only suitable for the research aspect of quantitative finance, whereas other more specialised hardware including Field-Programmable Gate Arrays - FPGAs are used for U HFT Nowadays, most modern langauges support a degree of concurrency multithreading Thus it is straightforward to optimise a backtester, since all calculations are generally independent of the others. Scaling in software engineering and operations refers to the ability of the system to handle consistently increasing loads in the form of greater requests, higher processor usage and more memory allocation In algorithmic trading a strategy is able to scale if it can accept larger quantities of capital and still produce consistent returns The trading technology stack scales if it can endure larger trade volumes and increased latency, without bottlenecking. While systems must be designed to scale, it is often hard to predict beforehand where a bottleneck will occur Rigourous logging, testing, profiling and monitoring will aid greatly in allowing a system to scale Languages themselves are often described as unscalable This is usually the result of misinformation, rather than hard fact It is the total technology stack that should be ascertained for scalability, not the language Clearly certain languages have greater performance than others in particular use cases, but one language is never better than another in every sense. One means of managing scale is to separate concerns, as stated above In order to further introduce the ability to handle spikes in the system ie sudden volatility which triggers a raft of trades , it is useful to create a message queuing architecture This simply means placing a message queue system between components so that orders are stacked up if a certain component is unable to process many requests. Rather than requests being lost they are simply kept in a stack until the message is handled This is particularly useful for sending trades to an execution engine If the engine is suffering under heavy latency then it will back up trades A queue between the trade signal generator and the execution API will alleviate this issue at the expense of potential trade slippage A well-respected open source message queue broker is RabbitMQ. Hardware and Operating Systems. The hardware running your strategy can have a significant impact on the profitability of your algorithm This is not an issue restricted to high frequency traders either A poor choice in hardware and operating system can lead to a machine crash or reboot at the most inopportune moment Thus it is necessary to consider where your application will reside The choice is generally between a personal desktop machine, a remote server, a cloud provider or an exchange co-located server. Desktop machines are simple to install and administer, especially with newer user friendly operating systems such as Windows 7 8, Mac OSX and Ubuntu Desktop systems do possess some significant drawbacks, however The foremost is that the versions of operating systems designed for desktop machines are likely to require reboots patching and often at the worst of times They also use up more computational resources by the virtue of requiring a graphical user interface GUI. Utilising hardware in a home or local office environment can lead to internet connectivity and power uptime problems The main benefit of a desktop system is that significant computational horsepower can be purchased for the fraction of the cost of a remote dedicated server or cloud based system of comparable speed. A dedicated server or cloud-based machine, while often more expensive than a desktop option, allows for more significant redundancy infrastructure, such as automated data backups, the ability to more straightforwardly ensure uptime and remote monitoring They are harder to administer since they require the ability to use remote login capabilities of the operating system. In Windows this is generally via the GUI Remote Desktop Protocol RDP In Unix-based systems the command-line Secure SHell SSH is used Unix-based server infrastructure is almost always command-line based which immediately renders GUI-based programming tools such as MatLab or Excel to be unusable. A co-located server, as the phrase is used in the capital markets, is simply a dedicated server that resides within an exchange in order to reduce latency of the trading algorithm This is absolutely necessary for certain high frequency trading strategies, which rely on low latency in order to generate alpha. The final aspect to hardware choice and the choice of programming language is platform-independence Is there a need for the code to run across multiple different operating systems Is the code designed to be run on a particular type of processor architecture, such as the Intel x86 x64 or will it be possible to execute on RISC processors such as those manufactured by ARM These issues will be highly dependent upon the frequency and type of strategy being implemented. Resilience and Testing. One of the best ways to lose a lot of money on algorithmic trading is to create a system with no resiliency This refers to the durability of the sytem when subject to rare events, such as brokerage bankruptcies , sudden excess volatility, region-wide downtime for a cloud server provider or the accidental deletion of an entire trading database Years of profits can be eliminated within seconds with a poorly-designed architecture It is absolutely essential to consider issues such as debuggng, testing, logging, backups, high-availability and monitoring as core components of your system. It is likely that in any reasonably complicated custom quantitative trading application at least 50 of development time will be spent on debugging, testing and maintenance. Nearly all programming languages either ship with an associated debugger or possess well-respected third-party alternatives In essence, a debugger allows execution of a program with insertion of arbitrary break points in the code path, which temporarily halt execution in order to investigate the state of the system The main benefit of debugging is that it is possible to investigate the behaviour of code prior to a known crash point. Debugging is an essential component in the toolbox for analysing programming errors However, they are more widely used in compiled languages such as C or Java, as interpreted languages such as Python are often easier to debug due to fewer LOC and less verbose statements Despite this tendency Python does ship with the pdb which is a sophisticated debugging tool The Microsoft Visual C IDE possesses extensive GUI debugging utilities, while for the command line Linux C programmer, the gdb debugger exists. Testing in software development refers to the process of applying known parameters and results to specific functions, methods and objects within a codebase, in order to simulate behaviour and evaluate multiple code-paths, helping to ensure that a system behaves as it should A more recent paradigm is known as Test Driven Development TDD , where test code is developed against a specified interface with no implementation Prior to the completion of the actual codebase all tests will fail As code is written to fill in the blanks , the tests will eventually all pass, at which point development should cease. TDD requires extensive upfront specification design as well as a healthy degree of discipline in order to carry out successfully In C , Boost provides a unit testing framework In Java, the JUnit library exists to fulfill the same purpose Python also has the unittest module as part of the standard library Many other languages possess unit testing frameworks and often there are multiple options. In a production environment, sophisticated logging is absolutely essential Logging refers to the process of outputting messages, with various degrees of severity, regarding execution behaviour of a system to a flat file or database Logs are a first line of attack when hunting for unexpected program runtime behaviour Unfortunately the shortcomings of a logging system tend only to be discovered after the fact As with backups discussed below, a logging system should be given due consideration BEFORE a system is designed. Both Microsoft Windows and Linux come with extensive system logging capability and programming languages tend to ship with standard logging libraries that cover most use cases It is often wise to centralise logging information in order to analyse it at a later date, since it can often lead to ideas about improving performance or error reduction, which will almost certainly have a positive impact on your trading returns. While logging of a system will provide information about what has transpired in the past, monitoring of an application will provide insight into what is happening right now All aspects of the system should be considered for monitoring System level metrics such as disk usage, available memory, network bandwidth and CPU usage provide basic load information. Trading metrics such as abnormal prices volume, sudden rapid drawdowns and account exposure for different sectors markets should also be continuously monitored Further, a threshold system should be instigated that provides notification when certain metrics are breached, elevating the notification method email, SMS, automated phone call depending upon the severity of the metric. System monitoring is often the domain of the system administrator or operations manager However, as a sole trading developer, these metrics must be established as part of the larger design Many solutions for monitoring exist proprietary, hosted and open source , which allow extensive customisation of metrics for a particular use case. Backups and high availability should be prime concerns of a trading system Consider the following two questions 1 If an entire production database of market data and trading history was deleted without backups how would the research and execution algorithm be affected 2 If the trading system suffers an outage for an extended period with open positions how would account equity and ongoing profitability be affected The answers to both of these questions are often sobering. It is imperative to put in place a system for backing up data and also for testing the restoration of such data Many individuals do not test a restore strategy If recovery from a crash has not been tested in a safe environment, what guarantees exist that restoration will be available at the worst possible moment. Similarly, high availability needs to be baked in from the start Redundant infrastructure even at additional expense must always be considered, as the cost of downtime is likely to far outweigh the ongoing maintenance cost of such systems I won t delve too deeply into this topic as it is a large area, but make sure it is one of the first considerations given to your trading system. Choosing a Language. Considerable detail has now been provided on the various factors that arise when developing a custom high-performance algorithmic trading system The next stage is to discuss how programming languages are generally categorised. Type Systems. When choosing a language for a trading stack it is necessary to consider the type system The languages which are of interest for algorithmic trading are either statically - or dynamically-typed A statically-typed language performs checks of the types eg integers, floats, custom classes etc during the compilation process Such languages include C and Java A dynamically-typed language performs the majority of its type-checking at runtime Such languages include Python, Perl and JavaScript. For a highly numerical system such as an algorithmic trading engine, type-checking at compile time can be extremely beneficial, as it can eliminate many bugs that would otherwise lead to numerical errors However, type-checking doesn t catch everything, and this is where exception handling comes in due to the necessity of having to handle unexpected operations Dynamic languages ie those that are dynamically-typed can often lead to run-time errors that would otherwise be caught with a compilation-time type-check For this reason, the concept of TDD see above and unit testing arose which, when carried out correctly, often provides more safety than compile-time checking alone. Another benefit of statically-typed languages is that the compiler is able to make many optimisations that are otherwise unavailable to the dynamically - typed language , simply because the type and thus memory requirements are known at compile-time In fact, part of the inefficiency of many dynamically-typed languages stems from the fact that certain objects must be type-inspected at run-time and this carries a performance hit Libraries for dynamic languages, such as NumPy SciPy alleviate this issue due to enforcing a type within arrays. Open Source or Proprietary. One of the biggest choices available to an algorithmic trading developer is whether to use proprietary commercial or open source technologies There are advantages and disadvantages to both approaches It is necessary to consider how well a language is supported, the activity of the community surrounding a language, ease of installation and maintenance, quality of the documentation and any licensing maintenance costs. The Microsoft stack including Visual C , Visual C and MathWorks MatLab are two of the larger proprietary choices for developing custom algorithmic trading software Both tools have had significant battle testing in the financial space, with the former making up the predominant software stack for investment banking trading infrastructure and the latter being heavily used for quantitative trading research within investment funds. Microsoft and MathWorks both provide extensive high quality documentation for their products Further, the communities surrounding each tool are very large with active web forums for both The software allows cohesive integration with multiple languages such as C , C and VB, as well as easy linkage to other Microsoft products such as the SQL Server database via LINQ MatLab also has many plugins libraries some free, some commercial for nearly any quantitative research domain. There are also drawbacks With either piece of software the costs are not insignificant for a lone trader although Microsoft does provide entry-level version of Visual Studio for free Microsoft tools play well with each other, but integrate less well with external code Visual Studio must also be executed on Microsoft Windows, which is arguably far less performant than an equivalent Linux server which is optimally tuned. MatLab also lacks a few key plugins such as a good wrapper around the Interactive Brokers API, one of the few brokers amenable to high-performance algorithmic trading The main issue with proprietary products is the lack of availability of the source code This means that if ultra performance is truly required, both of these tools will be far less attractive. Open source tools have been industry grade for sometime Much of the alternative asset space makes extensive use of open-source Linux, MySQL PostgreSQL, Python , R, C and Java in high-performance production roles However, they are far from restricted to this domain Python and R, in particular, contain a wealth of extensive numerical libraries for performing nearly any type of data analysis imaginable, often at execution speeds comparable to compiled languages, with certain caveats. The main benefit of using interpreted languages is the speed of development time Python and R require far fewer lines of code LOC to achieve similar functionality, principally due to the extensive libraries 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 dependency versioning 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, operating system interaction, GUIs, regular expressions regex , iteration and basic algorithms. C is famed for its Standard Template Library STL which contains a wealth of high performance data structures and algorithms for free Python is known for being able to communicate with nearly any other type of system protocol especially the web , mostly through its own standard library R has a wealth of statistical and econometric tools built in, while MatLab is extremely optimised for any numerical linear algebra code which can be found in portfolio optimisation and derivatives pricing, for instance. Outside of the standard libraries, C makes use of the Boost library, which fills in the missing parts of the standard library In fact, many parts of Boost made it into the TR1 standard and subsequently are available in the C 11 spec, including native support for lambda expressions and concurrency. Python has the high performance NumPy SciPy Pandas data analysis library combination, which has gained widespread acceptance for algorithmic trading research Further, high-performance plugins exist for access to the main relational databases, such as MySQL MySQL C , JDBC Java MatLab , MySQLdb MySQL Python and psychopg2 PostgreSQL Python Python can even communicate with R via the RPy plugin. An often overlooked aspect of a trading system while in the initial research and design stage is the connectivity to a broker API Most APIs natively support C and Java, but some also support C and Python, either directly or with community-provided wrapper code to the C APIs In particular, Interactive Brokers can be connected to via the IBPy plugin If high-performance is required, brokerages will support the FIX protocol. As is now evident, the choice of programming language s for an algorithmic trading system is not straightforward and requires deep thought The main considerations are performance, ease of development, resiliency and testing, separation of concerns, familiarity, maintenance, source code availability, licensing costs and maturity of libraries. 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 Trading.

No comments:

Post a Comment