R Shiny demo: Trading Strategy backtesting and Find Fastest subway in NYC



Presented by NYC Data Science Academy students who just finished 12 weeks full time program, apply for Sept 2015 and Jan 2016 program to be a Data Scientist. Preparation: Please bring your laptop, we will show some trick and codes to get your on fast track! Event schedule: 6:30-7:00 Visualization of Trading Strategy backtesting 7:00-7:15 Q&A 7:15-7:45 Fastest subway in NYC (Data updates every 10seconds!) 7:45-8:00 Q&A Speaker bio: Luke Lin is currently a Ph.D. candidate in Mathematics at Stony Brook University who is specialized in partial differential equations. As a lifelong learner of mathematics, he is extremely efficient in quantitative analysis and also skilled at communicating abstract concepts. With proficiency in R and Python, Luke is primed to be a major asset to any analytic force. Xavier Capdepon (MSc Urban Engineering & Master in Corporate Finance) Xavier has more than 12 years experience in analytical modeling. In a career ranging from transportation research to insurance securitization trading and esoteric securities banking, Xavier has deep roots in Data Science. From C and VBA, to SQL, R and Python, Xavier believes in knowing the best-in-breed toolkits. An experienced instructor and consultant in the field of finance, Xavier continues to deepen his abiding interest in prediction through taking the ASA/CAS actuarial exams (first two completed) and experimenting with machine learning models using Hadoop and Spark. Previously at Guggenheim Partners, he is currently a Fellow at the NYC Data Science Academy. Agenda/Content: Demonstration of a Shiny App for building strategy from technical indicators and visualizing the return. In this Shiny App, Luke implemented a trading strategy generated by Bollinger Band, visualized the return and eventually modified the strategy by MACD. Bollinger Band is an elementary volatility indicator and the strategy is generated based on the belief that the price bounce back whenever it hits the edge of Bollinger Band. This is an one of the simplest strategies and personally I believe it reflects humans' most naive feeling about the stock prices. The visualization builds up the connection between the market data and our strategy, because we can actually see how market react to it. Once the return can be seen, it is straightforward to understand why a strategy fail in certain period. In our case, we see that strategy fails when the trend price is very strong--which makes sense because when trend is strong the assumption that the price bounce back is no longer valid. Here we need to impose another popular indicator, MACD. MACD reveals momentum of the price change. The backend algorithm basically suspends buying signal from Bollinger Band and encourages selling to stop loss when MACD shows very negative momentum. It does the opposite when MACD indicates positive momentum. This simple modification reduce the risk or improve the return in several different stocks.The importance of his method lies in the fact that concept behind the modification is simple and the math I used is basic yet the improvement is obvious. This suggests to a reasonable extent our trading result can be improved with better tool and understanding. Demonstration of a Shiny App for processing subways traveling time calculations and visualizing the subways movements in real time using a Python script. In his Shiny app, Xavier explored the MTA data by redrawing a map of New York using the paths of both buses and subways, implemented a script to compare and visualize the travel times of the lines 4 Express train and 1 local train from the bronx to lower manhattan and to create a real time map of the 1 train. The idea for the app is based on a comment from his sister in law who mentionned several times that, in her experience, the subways, 1 local trains and 4 express trains, were not running with the same punctuality from the Bronx to Lower Manhattan during the early morning peak. In order to investigate, Xavier used the static and real time data available on the MTA.info website. At first, in an attempt to make sense of the numerous files and data available, he used the data to redraw the map of new york city using the paths used every day by the buses and the subways. The visualization is a map with a particularity: the transparency of the drawing package ggplot2 allows to highlight the streets used by several bus lines around new york city.Then, Xavier wrote a script to gather the data and calculate the travel time for the 1 and 4 trains from the Bronx to lower Manhattan given a depart time along the day. The visualization some trends over the day with two peaks at rush hours and lower difference in travel time between the 1 and 4 trains than expected. Finally, using the work described previously, the Shiny app also presents a real time map of the 1 train using real time data gathered every 10 second from the MTA API using Python script.

Comments

  1. from when ANDY LANK METHOD is in my hands it is absolutely easy to run my binary option as well.. but some times it broken down when i use.. have a good ofer for you..see you later..


Additional Information:

Visibility: 2037

Duration: 0m 0s

Rating: 5