{"id":3320,"date":"2017-11-14T08:26:54","date_gmt":"2017-11-14T08:26:54","guid":{"rendered":"http:\/\/joapen.com\/blog\/?p=3320"},"modified":"2017-11-17T12:50:20","modified_gmt":"2017-11-17T12:50:20","slug":"hello-world-quantitative-trading","status":"publish","type":"post","link":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/","title":{"rendered":"Hello world in quantitative trading"},"content":{"rendered":"<p>Since <a href=\"http:\/\/joapen.com\/blog\/2017\/09\/20\/quantitative-trading-on-cryptocurrency-market\/\">I started<\/a> on this field the focus has been to be able to build a set of<\/p>\n<p>I found this <a href=\"https:\/\/www.quantstart.com\/articles\/My-Talk-At-The-London-Financial-Python-User-Group\">training course<\/a> with the slides posted, where Michael Halls-Moore explains the basis of the backtesting with Python and Pandas.<\/p>\n<h1>Things to remind<\/h1>\n<ul>\n<li>Taxonomy of trading strategies: forecasting, mean reversion, momentum and high frequency trading.<\/li>\n<li>Review of the backtesting pitfalls: the same ones that mentioned by <a href=\"http:\/\/joapen.com\/blog\/2017\/09\/20\/quantitative-trading-ernie-chang\/\">Ernie Chang<\/a>.<\/li>\n<li>Things to do after you perform the moving average crossover strategy:\n<ul>\n<li>Multi-symbol portfolio.<\/li>\n<li>Risk management (the most important topic).<\/li>\n<li>True event-driven backtesting, realistic handling of transaction costs, fees&#8230;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>Moving Average Crossover Strategy<\/h1>\n<p>this is defined as the \u201cHello World\u201d of quantitative trading. It&#8217;s included a specific <a href=\"https:\/\/www.quantstart.com\/articles\/Backtesting-a-Moving-Average-Crossover-in-Python-with-pandas\">article,<\/a><\/p>\n<h1>Exponentially weighted moving average (EWMA)<\/h1>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Moving_average\">EWMA<\/a> is a type of infinite impulse response filter that applies weighting factors which decrease exponentially. The weighting for each older datum decreases exponentially, never reaching zero.<\/p>\n<h1>Code written in Python 2<\/h1>\n<p>The proposed code is in python 2, but <a href=\"https:\/\/nbviewer.jupyter.org\/gist\/dmitryhd\/735061a28ed26750a6772b1b61fc57bf\">here<\/a> you can find a guy that adapted it to python3. It uses Quandl library for obtaining financial data easily.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael Halls-Moore explains the basis of the backtesting with Python and Pandas. Things to remind Taxonomy of trading strategies: forecasting, mean reversion, momentum and high frequency trading. &#8230; <a title=\"Hello world in quantitative trading\" class=\"read-more\" href=\"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/\" aria-label=\"Read more about Hello world in quantitative trading\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104,105],"tags":[],"class_list":["post-3320","post","type-post","status-publish","format-standard","hentry","category-python","category-trading"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hello world in quantitative trading -<\/title>\n<meta name=\"description\" content=\"Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael - joapen projects\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hello world in quantitative trading -\" \/>\n<meta property=\"og:description\" content=\"Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael - joapen projects\" \/>\n<meta property=\"og:url\" content=\"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/\" \/>\n<meta property=\"og:site_name\" content=\"joapen projects\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-14T08:26:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-17T12:50:20+00:00\" \/>\n<meta name=\"author\" content=\"joapen\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"joapen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/\"},\"author\":{\"name\":\"joapen\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"headline\":\"Hello world in quantitative trading\",\"datePublished\":\"2017-11-14T08:26:54+00:00\",\"dateModified\":\"2017-11-17T12:50:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/\"},\"wordCount\":186,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"articleSection\":[\"Python\",\"Trading\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/\",\"name\":\"Hello world in quantitative trading -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-11-14T08:26:54+00:00\",\"dateModified\":\"2017-11-17T12:50:20+00:00\",\"description\":\"Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael - joapen projects\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2017\\\/11\\\/14\\\/hello-world-quantitative-trading\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/joapen.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hello world in quantitative trading\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/\",\"name\":\"joapen projects\",\"description\":\"Just a place to write\",\"publisher\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/joapen.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\",\"name\":\"joapen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"contentUrl\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"width\":400,\"height\":400,\"caption\":\"joapen\"},\"logo\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\"},\"sameAs\":[\"http:\\\/\\\/www.joapen.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hello world in quantitative trading -","description":"Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael - joapen projects","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/","og_locale":"en_US","og_type":"article","og_title":"Hello world in quantitative trading -","og_description":"Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael - joapen projects","og_url":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/","og_site_name":"joapen projects","article_published_time":"2017-11-14T08:26:54+00:00","article_modified_time":"2017-11-17T12:50:20+00:00","author":"joapen","twitter_misc":{"Written by":"joapen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/#article","isPartOf":{"@id":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/"},"author":{"name":"joapen","@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"headline":"Hello world in quantitative trading","datePublished":"2017-11-14T08:26:54+00:00","dateModified":"2017-11-17T12:50:20+00:00","mainEntityOfPage":{"@id":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/"},"wordCount":186,"commentCount":0,"publisher":{"@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"articleSection":["Python","Trading"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/","url":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/","name":"Hello world in quantitative trading -","isPartOf":{"@id":"https:\/\/joapen.com\/blog\/#website"},"datePublished":"2017-11-14T08:26:54+00:00","dateModified":"2017-11-17T12:50:20+00:00","description":"Since I started on this field the focus has been to be able to build a set of I found this training course with the slides posted, where Michael - joapen projects","breadcrumb":{"@id":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/joapen.com\/blog\/2017\/11\/14\/hello-world-quantitative-trading\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/joapen.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Hello world in quantitative trading"}]},{"@type":"WebSite","@id":"https:\/\/joapen.com\/blog\/#website","url":"https:\/\/joapen.com\/blog\/","name":"joapen projects","description":"Just a place to write","publisher":{"@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/joapen.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217","name":"joapen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","url":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","contentUrl":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","width":400,"height":400,"caption":"joapen"},"logo":{"@id":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg"},"sameAs":["http:\/\/www.joapen.com"]}]}},"_links":{"self":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/3320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/comments?post=3320"}],"version-history":[{"count":4,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/3320\/revisions"}],"predecessor-version":[{"id":3327,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/3320\/revisions\/3327"}],"wp:attachment":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/media?parent=3320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/categories?post=3320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/tags?post=3320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}