Project Proposal: Monitoring and Processing Stock Market Data In Real Time Using the Cyclone V FPGA



Similar documents
Enhance Service Delivery and Accelerate Financial Applications with Consolidated Market Data

Ping Pong Game with Touch-screen. March 2012

Improved metrics collection and correlation for the CERN cloud storage test framework

A Low Latency Library in FPGA Hardware for High Frequency Trading (HFT)

Wireless Security Camera with the Arduino Yun

Principle and Implementation of. Protocol Oblivious Forwarding

Forecasting Trade Direction and Size of Future Contracts Using Deep Belief Network

Long-term Stock Market Forecasting using Gaussian Processes

Market Velocity and Forces

The Advanced JTAG Bridge. Nathan Yawn 05/12/09

Open Flow Controller and Switch Datasheet

Monitoring the Real End User Experience

An Embedded Wireless Mini-Server with Database Support

NetFlow probe on NetFPGA

Module: Sharepoint Administrator

Using Mobile Processors for Cost Effective Live Video Streaming to the Internet

Skynax. Mobility Management System. System Manual

Powerful Management of Financial Big Data

Chapter 11 I/O Management and Disk Scheduling

Computer Technology Department, De La Salle University, 2401 Taft Ave., Manila

Technical Brief. DualNet with Teaming Advanced Networking. October 2006 TB _v02

Design of automatic testing tool for railway signalling systems software safety assessment

Chapter 20: Data Analysis

MICRO-COMPUTER BASED REAL ESTATE DECISION MAKING AND INFORMATION MANAGEMENT - AN INTEGRATED APPROACH

Chapter 12 INVESTING IN STOCKS

Japannext PTS ITCH Market Data Specification. Version 1.4 Updated 3 October 2014

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

EPM2000 LabVIEW Building Applications Instructions

Secure Network Communications FIPS Non Proprietary Security Policy

Networking Remote-Controlled Moving Image Monitoring System

Epiphan Frame Grabber User Guide

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Introducing the Adafruit Bluefruit LE Sniffer

Landscape Design and Integration. SAP Mobile Platform 3.0 SP02

TickView Live Feed. Product Overview. April Document Number:

SIB relays C++ API SQL API. Kernel. Hardware Desc. XML. XML Parser parser.h. State. Misc. Mgmt. I/O Manager iomgr.h. Data Acq. XCR. Batt. Mgmt.

REDUCING THE COST OF GROUND SYSTEM DEVELOPMENT AND MISSION OPERATIONS USING AUTOMATED XML TECHNOLOGIES. Jesse Wright Jet Propulsion Laboratory,

Development of complex KNX Devices

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Application Note: AN00141 xcore-xa - Application Development

NASDAQ ITCH to Trade Options

Real time vehicle tracking and driver behaviour monitoring using cellular handset based accelerometer and GPS data

SecureDoc Disk Encryption Cryptographic Engine

Performance Monitoring of Parallel Scientific Applications

Research Report: The Arista 7124FX Switch as a High Performance Trade Execution Platform

Sample Project List. Software Reverse Engineering

Ways to Use USB in Embedded Systems

Testing L7 Traffic Shaping Policies with IxChariot IxChariot

The Value of Physical Memory for Incident Response

Basics of VTune Performance Analyzer. Intel Software College. Objectives. VTune Performance Analyzer. Agenda

Cloud and Big Data Summer School, Stockholm, Aug Jeffrey D. Ullman

Appendix M INFORMATION TECHNOLOGY (IT) YOUTH APPRENTICESHIP

Mark Bennett. Search and the Virtual Machine

Computer Automation Techniques. Arthur Carroll

H MICRO CASE STUDY. Device API + IPC mechanism. Electrical and Functional characterization of HMicro s ECG patch

Video Conference System

HYPER MEDIA MESSAGING

Computer Organization & Architecture Lecture #19

Development of Monitoring and Analysis Tools for the Huawei Cloud Storage

Synapse s SNAP Network Operating System

Purpose Computer Hardware Configurations... 6 Single Computer Configuration... 6 Multiple Server Configurations Data Encryption...

Linux Driver Devices. Why, When, Which, How?

VitalJacket SDK v Technical Specifications

Development Kit (MCSDK) Training

Car Racing Game. Figure 1 The Car Racing Game

CloudFTP: A free Storage Cloud

LCMON Network Traffic Analysis

Wireless Transmission of JPEG file using GNU Radio and USRP

Firewall Builder Architecture Overview

LOAD BALANCING TECHNIQUES FOR RELEASE 11i AND RELEASE 12 E-BUSINESS ENVIRONMENTS

How To Monitor A Document Management System On A Web Browser On A Linux Computer (For Free)

Performance Workload Design

HARDWARE ACCELERATION IN FINANCIAL MARKETS. A step change in speed

About this Course This 5 day ILT course teaches IT Professionals to design and deploy Microsoft SharePoint 2010.

E6895 Advanced Big Data Analytics Lecture 3:! Spark and Data Analytics

Log Mining Based on Hadoop s Map and Reduce Technique

Embedded Software development Process and Tools: Lesson-3 Host and Target Machines

Study and installation of a VOIP service on ipaq in Linux environment

A General Framework for Tracking Objects in a Multi-Camera Environment

AlliedWare Plus OS How To Use sflow in a Network

Introduction to Android

2) What is the structure of an organization? Explain how IT support at different organizational levels.

Measure wireless network performance using testing tool iperf

PIE. Internal Structure

FabulaTech Products Advanced Communications Solutions

Assignment # 1 (Cloud Computing Security)

MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN.

White Paper Increase Flexibility in Layer 2 Switches by Integrating Ethernet ASSP Functions Into FPGAs

Understanding Slow Start

Image Management Suite. Mini Thesis. Roland Foster. Supervisors: Mr. Mehrdad Ghaziasgar and Mr. James Connan. B.Sc. Honours

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

Compiler I: Syntax Analysis Human Thought

EView/400i Management Pack for Systems Center Operations Manager (SCOM)

Configuring the BIG-IP and Check Point VPN-1 /FireWall-1

Axon: A Flexible Substrate for Source- routed Ethernet. Jeffrey Shafer Brent Stephens Michael Foss Sco6 Rixner Alan L. Cox

Praktikum "Mobile Roboter" mit Simulation und Telerobotik-Zugang (TELEBOTS)

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Magento & Zend Benchmarks Version 1.2, 1.3 (with & without Flat Catalogs)

A perspective to incident response or another set of recommendations for malware authors

基 於 SDN 與 可 程 式 化 硬 體 架 構 之 雲 端 網 路 系 統 交 換 器

Transcription:

Project Proposal: Monitoring and Processing Stock Market Data In Real Time Using the Cyclone V FPGA Alexander Gazman (ag3529), Hang Guan (hg2388), Nathan Abrams (nca2123) 1. Introduction The general premise of our project is to design a system where hardware and software work together to monitor real time stock data for many stocks and implement an algorithm to analyze the market to inform a user on whether they should buy, sell, or hold the stock. The stock s fluctuations in price will also be displayed on a screen with a confidence level associated with the suggested action. 2. General Design Our system is composed of a workstation, a FPGA development board and several peripherals (e.g. monitors, keyboards), as shown in Figure 1. In the workstation, we will mainly implement a software, that can automatically fetch stock data from Yahoo Finance API, wrap it as the payload into a TCP/UDP package, and send to our FPGA development board through Ethernet ports. In the FPGA development board, we will implement a NIOS based system which can achieve various of functions: 1) extract the payload out of the TCP/UDP package, 2) parse the stock information, store the information efficiently (based on some sorting algorithm) into the on chip memory for further processing, 3) display the stock movement (e.g. volume, price, etc), and more importantly, 4) implementing some data mining algorithms that can provide users information regarding the proper action towards certain stocks (e.g. whether or not should the users buy this stock at certain time). Figure 1: System composition 1

Figure 2 shows the diagram of our stock data processing and monitoring system. The TCP/UDP parser will first extract the internet package and get rid of the herders of the package. After that, the stock information storage will save the extracted information based on a lookup table, which contains the starting address of each stock. We are interested in exploring the possibility of using other more efficient mapping algorithms (e.g. binary tree) to improve the speed of our system. Meanwhile, the stock information storage module will not only write, but also read the stored information out of the on chip memory based on the commands that given by the data mining module. The data mining module will run multiple algorithms (e.g. mean reversion) which can provide the users with the related indices and other metrics. The display module is needed to plot the the stock tendency and other related informations on the monitor. Figure 2: System block diagram 3. Inputting Stock Data Both real time and historical stock market data will be imported from Yahoo Finance using a dedicated Python library [1]. Other data, like NASDAQ stock data are also available on the website [2]. The data is downloaded from the website based on web scraping through Yahoo s open source API. The library allows to download for each stock symbol the following data sets: stock volume (number of buys and sells per day), opening and closing price, high and low values and the date. The information is saved in a Python dictionary data structure and parsed getting the values in interest. 2

To validate the code, Yahoo s stock values were plotted and compared to the online data. In figure 3, it is possible to see the correlation between the scraped and the online data of Yahoo s stock market value over time period of 4 years. The agreement between the the results further examined in TEVA, APPL and GOOGL stocks. Figure 3: Comparison of Yahoo stock market data using the Python (left) versus the online data (right) For transmitting the data to the FPGA we will design a specific hardware driver that will communicate with the software through either the ARM processor or a NIOS II processor on the board. From the given sets of information, including the real time values, the driver will accept the necessary data to evaluate the algorithm (see below). At this point, stock market data is downloaded using Python, however, it might needed to migrate to code to C program to communicate with the hardware driver. For simplicity purposes, we can have a hybrid version of Python (embedded in Linux) and C to for downloading data and sending to the FPGA for processing. 4. Algorithm As indicated in milestone one, one of our first tasks will be to finalize the algorithm we will be using. At this time, we believe we will be implementing an algorithm based on mean reversion. The general idea behind mean reversion is that while a stock will fluctuate, there will be some relatively steady average over time. It is expected that the stock will regress back to this mean during these fluctuations. The mean for mean reversion is often some time averaged mean over the order of 10 s of days. Once the trading range of a stock is identified, the time averaged price can be computed as it relates to assets, earnings, or other metrics. The basic idea is that when the stock s price fluctuates above this mean the stock is attractive to sell and when the 3

stock s price fluctuates below this mean the stock is attractive to buy. Statistical parameters such as the standard deviation over the relevant time period can be used to provide a level of confidence for the decision to buy or sell (for example, only buy/sell when the stock is 0.3 standard deviations away from the mean). At a first pass, this could be a very simple algorithm to implement, however, we expect that are more involved methods based on mean reversion that will allow us to implement a more complex algorithm (if we wish) that weighs some risk cost into the potential earnings and use that in combination with the standard deviation to provide a suggestion to buy or sell. While mean reversion is the frontrunner for the algorithm we will implement, other algorithms include pair trading and arbitrage. Pair trading involves two historically correlated securities. A simple example is Pepsi and Coca cola. Since they both produce soda, we expect the stocks to be correlated. Pair trading involves taking advantage of scenarios when this correlation is weakened, shorting the over performing stock and going long on the under performing stock. The disadvantage of implementing this algorithm is that we don t necessarily expect real data to demonstrate a weakened correlation while we are working on the project, so we may have to introduce fake data to demonstrate that the algorithm works. Arbitrage involves identifying when an asset does not trade at the same price on all markets. The example we found was for discrepancies between the S&P futures and the S&P 500 stocks as the S&P 500 stocks (mostly traded on the NYSE and NASDAQ) will get ahead or behind the S&P futures (mostly traded on the CME). While pair trading and arbitrage are interesting potential algorithms, we will likely be implementing some version of mean reversion as our algorithm. 5. Memory Once we parse the stock data from yahoo and send it via ethernet to Nios II or the ARM processor, we will need to store it in memory on the FPGA. We admit that this is an area we are less certain on how to implement, and finalizing the memory design is under milestone one. If we want to be able to display data for a moving average, we will need to have snapshots stored of the time and the value of the stock. For implementing the mean reversion algorithm we will need to have the time averaged stock value and the corresponding standard deviation. Since the time sensitive data we need for the mean reversion algorithm is just the time averaged mean and the standard deviation, it may be worthwhile to split the memory into two sections for each stock: a quick updated block that only contains the mean and standard deviation, and a lower priority block for containing snapshots of the past data for when the user wants to display the stock s value over the time averaged period. New data updates the mean and standard deviation, and shifts the memory of the time averaged period, deleting the oldest data entry. 4

Figure 4: Potential memory design for a single stock of interest 6. Display/Output For the display, we plan on implementing something in the vein as shown below using VGA to a screen. A stock of interest can be selected (or the display can snap to a stock when the algorithm determines that an action buy or sell should be performed). The stock name will be shown, and there will be a graph of the stock s price over the time period for which the mean has been averaged over (on the order of 10 s of days). On the graph, there will be a shaded non action interval which can be calculated from the algorithm and can take into account the standard deviation and other risk assessment parameters determined from the algorithm; within this interval the stock is held. If it the stock rises above this non action interval, the action is to sell. Similarly, if the stock falls below the non action interval, the decision is to buy. We could also display some stock confidence value that is based on the standard deviation and other risk assessment factors, and could normalize it to be between 1 and 1 for the non action interval. Finally, we will need to decide if we want to implement mimicking an outbound order byte stream in a particular protocol s format (a decision to be made by milestone one). 5

Figure 5: Potential display 6

6. Milestones Milestone One (4/2/2015) Finalize which of the algorithms we will implement (likely mean reversion) Implement algorithm not in hardware (demonstrate it works in software) Implement parsing Yahoo stock data into FPGA (but not necessarily storing it) Finalize group decision on how we would like to display output, memory structure, and whether we want to implement an outbound order Milestone Two (4/14/2015) Implement memory structure in hardware (independent of actual data using hardcoded values) Implement algorithm in hardware (independent of actual data using hardcoded values) Implement first pass display output (for example, a stock s mean, standard deviation, and buy/sell/hold decision, outputted to screen) Implement outbound order (if we decide we would like to in milestone one) using hardcoded dummy data Milestone Three (4/28/2015) Connect data stream to memory structure and algorithm Finalize display (potentially also including a graph of the stock s price over the time period it is averaged) Finalize outbound order with real data (if we decide we would like to in milestone one) Implement other FPGA to receive outbound order (if time: unlikely) Implement additional algorithms (if time: possibly likely) Final Project (5/14/2015) Hopefully just creating the presentation, however, we anticipate that the previous milestones will not go exactly according to plan (the main bullet points that concern us are implementing the memory structure and algorithm in hardware we expect that they may spill over into milestone three). 8. Resources 1. https://github.com/lukaszbanasiak/yahoo finance 2. http://www.nasdaqtrader.com/trader.aspx?id=itch 7

8