trade smart zihao yu kevin bobsein ashrith kumar marpaka hanzhi wu instructor : prof. ivan marsic...

26
TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering -2 for web applications 16:332:568 Spring 2009 DATE: 05/08/2009

Upload: brice-norris

Post on 26-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

TRADE SMART

Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu

Instructor : Prof. Ivan Marsic

Partial fulfillment of the course Software Engineering -2 for web applications

16:332:568 Spring 2009

DATE: 05/08/2009

Page 2: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

PAST

• Stock markets and Indices

• Introduction to Technical analysis

• Fundamental Analysis

• Indicators

• Work Plan

• System Architecture

• Use cases

• Web services

Page 3: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

LIFE CYCLE

• System design

• Data collection

• Website development

• Web Service

• XML Schema

• Indicators

• Patterns

• Integration

• Test and RUN

Page 4: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

LABOR

Page 5: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering
Page 6: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

System Architecture

• Four tier architectureclient

web server

database

modules

Page 7: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

System block instruction

Page 8: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Use Case DiagramCreateAccount

ManageFile

GetGraphs

User

Login

<<extend>>

<<extend>>

GetQuotes

<<include>>

GetIndicators

GetPattern

GetPredictedprice

Administrator

<<participate>>

<<participate>>

<<participate>>

<<participate>>

<<participate>>

<<initiate>>

<<initiate>>

<<initiate>>

<<initiate>>

<<initiate>>

Page 9: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Name Login

Participating actors

Initiated by AdministratorCommunicates with Users

Flow of events 1. The Administrator requests the creation of the login function. 2. The user inputs his/her name, and password to create the account. Then he/she inputs his/her name and password again to log in the system.3. webpage is displayed, showing some latest news and some important stock’s graphsdynamically.

Page 10: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Name GetQuotes

Participating actors

Initiated by AdministratorCommunicates with Users

Flow of events 1. The Administrator creates the GetQuotes 2. The user logs in into the webpage, and click Getquote button, get the stock information he need from yahoo, such as the start price, end price, volumns.

Page 11: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Name GetIndicator

Participating actors

Initiated by AdministratorCommunicates with Users

Flow of events 1. The Administrator creates GetIndicator. 2. The user selects the past data, for example, select the past 10 ending prices and then gets the indicator such as buy, sell or hold according to the moving average.Name GetPredictedprice

Participating actors

Initiated by AdministratorCommunicates with Users

Flow of events 1. The Administrator creates GetPredictedprice. 2. The user chooses the model, and get the price predicted by the model he choose.

Name GetPattern

Participating actors

Initiated by AdministratorCommunicates with Users

Flow of events 1. The Administrator creates the GetPattern. 2. The user choose the collects the data from the past days, and gets the predicted pattern.

Page 12: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Web Service Interface

• Software Stack– Apache Tomcat 5.5– Axis 1.4– Java 1.6

• Architecture– Services hosted by

Axis, served out by Apache, implemented using Java

Apache Tomcat

Axis

Stock Predictor and

Recommendation Service

Java Runtime

Page 13: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Interface APIgetPrediction(String)

getPrediction(String, String)

getPrediction(String, String, String)

IN

OUT

Page 14: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Issues Encountered

• Minimal documentation– All documentation available on the Web seems to be cut

and paste from the main Axis project page. – All tutorials are extremely simple and don’t go much

beyond “type these commands”, little description of what you’re actually doing

• Continually running into package/URN mapping issues– Sometimes the actual interface class just wouldn’t be

generated• Lack of logical built-in directory structure

– Due to Java dependence on packages, requirement that everything be placed in specific locations, unfortunately these locations aren’t very intuitive

Page 15: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Moving Average

• Implemented in Java

• If Today’s Moving Average from the last 15 days is > Yesterday’s Moving Average over the last 15 days, Buy

• If Today’s Moving Average from the last 15 days is < Yesterday’s Moving Average over the last 15 days, Sell

Page 16: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

INDICATORS

• RELATIVE FLOW INDEX

• STOCHASTIC OSCILLATOR

• MOVING AVERAGES

• PRICE MOMENTUM

OSCILLATOR

• MONEY FLOW INDEX

• DEMARKER INDICATOR

• WILLIAMS INDICATOR

• COMMODITY CHANNEL INDEX

•AROON INDICATOR

•RATE OF CHANGE

•MOVING AVERAGES

•CONVERGENCE/DIVERGENCE

•ACCUMULATION/

DISTRIBUTION LINE

•PRICE CHANNEL ULTIMATE

OSCILLATOR

Page 17: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Patterns

• Four patterns can be recognized.– Double Bottom

– Double Top

– Ascending Triangle

– Descending Triangle

Page 18: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

PATTERNS

Reality Training data(Generated using piecewise functions)

Page 19: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Pattern Recognition

Page 20: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Web Interface

Page 21: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Download Data

Page 22: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

RSS Parser

• Use Magpie PHP library.– Object cache, enhance performance.

• Our work: parsing tags in XML.

Page 23: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Where AJAX is used

Page 24: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

How

• jQuery Framework– Simplifies JS: event handling, AJAX interactions, etc

Page 25: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

Database

Page 26: TRADE SMART Zihao Yu Kevin Bobsein Ashrith Kumar Marpaka Hanzhi Wu Instructor : Prof. Ivan Marsic Partial fulfillment of the course Software Engineering

CONCLUSION

• Achievements

• What did we learn ?

• Further improvements .. !!

THANK YOU !!!!!!

DEMO