How Option Traders leverage Oracle R Enterprise to maximize

How Option Traders leverage Oracle R Enterprise to
maximize trading strategies
Brian Macdonald, Oracle Data Scientist
Oracle
Oracle BIWA Summit 2017
Big Data & Data Science Advisory Services
Customer Engagements that bring industry experience and best practices to demonstrate
and prototype solutions for customer in line with their strategic business goals.
1
2
Business
Value Definition
3
Solution
Architecture
Team skill-sets:
• Data Scientists
• Data Wranglers
• Architects
• Business Analysts
4
Data Science &
Machine Learning
Analytics
Design Hub
Team backgrounds from:
• Amazon
• MSFT
• Deloitte
• IBM
• Teradata
• etc.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle Confidential - Restricted
How can you compete with algorithms
when your business relies on
interpersonal relationships?
Oracle BIWA Summit 2017
Influential Financial Trading Company
Company Name must be kept confidential
• Financial service firm that provides servicing for
stock and option trades
• Provide advisory services and would like to grow
• Access to all trade details in real time
• Lots of trade reporting, validation and value added
services.
Oracle BIWA Summit 2017
These guys make lots of money.
So what’s the problem?
• Competitive pressure from algorithmic trading
platforms.
• Cutting into profits, must expand
• Despite profits, very inefficient use of resources
• Potential regulatory changes
.
Oracle BIWA Summit 2017
Business Questions
• How can they monetize the wealth of data they have?
• How can they make their quants more effective?
• How can they leverage their data platform better?
• How can they provide better service to their customers?
Start by calculating Greeks.
Oracle BIWA Summit 2017
What are Greeks?
Just a brief tutorial – I only have 30 minutes
The Greeks are the quantities representing the sensitivity of
the price of derivatives such as options to a change in
underlying parameters on which the value of an instrument
or portfolio of financial instruments is dependent.*
• Calculating Greeks has well defined mathematics
• Black-Scholes
• Not terribly complicated
• But quants do it on a one off basis
*https://en.wikipedia.org/wiki/Greeks_(finance)
Oracle BIWA Summit 2017
What are Greeks?
Just a brief tutorial – I only have 30 minutes
• Five basic measurements (of Options)
• Delta – Sensitivity to changes in the underlying stock price.
• Gamma - Sensitivity of the Delta.
• i.e. the change in the delta for a $1 change in the underlying
• Rho - Sensitivity to changes in interest rates
• Theta - Sensitivity to time
• Vega - Sensitivity to changes in implied volatility
• Additional 2nd and 3rd Order Greeks Exist
• Vanna, Vomma, Charm, Veta, Vera, Color, Speed, Ultima, Zomma
Adapted from http://www.optionmonster.com/education/option_greeks.php and Wikipedia
Oracle BIWA Summit 2017
Prior Technology State
• Technology
• Relational data warehouse
• Many BI tools
• R, matlab, SQL, what ever else is in their bag o tricks
• People
• Quants
Oracle BIWA Summit 2017
Prior Process for Quants
• Currently download data to their workstations
• Limited by CPUs,RAM, Storage
• Use the tools they like best
• They either do big market analysis
•
Takes a long time
• Or do individual equity analysis
•
Does not scale
Oracle BIWA Summit 2017
Oracle R Enterprise to the Rescue
• Use a tool Quants know and love. (R)
• Leverage power of Oracle Advanced Analytics
Exadata
• Lots of memory, Lots of CPUs, Parallelization Rocks!
• Use any Open Source R package
• Chose derivmkts
• Others exist
• Has greek function for doing everything we need
•.
Oracle BIWA Summit 2017
The Data
• Daily Stock prices for all U.S. equities
•
•
•
•
6,033 symbols going back to 02-JAN-62
21,353,462 Rows of Daily Close data
Symbol, Trade Date, Prices, Volatility,
Can run on real time quotes
• All Option Data
• Puts and Calls
• 24,610 options
Oracle BIWA Summit 2017
Beautiful Code using Oracle R Enterprise
Can control the level of
parallelism.
Oracle BIWA Summit 2017
Updates the ASOF_DATE
Calculate
the
number
of days
Column
in
Oracle
for
the
ore.groupApply
Create
a
function
will
to
loop
run
any
as ato%
ofused
a full
year
toover
be
Creates
abedata
frame
from
date
to
calculate
Load
derivmkts
library.
rows
R
code.
grouped
by
a
columns.
used
in greeks
calculation.
the
greeks
function.
the
greeks.
Call
greeks2
to be
Updates
the function
TT Column
in
This
can
do anything
and will
Adds
some
new
columns
for
calculate
greeks.
run
for each slice
of
Oracle.
the
symbol
and expiry
OPTIONS
specified
the date
table
OPTIONS$ID
bscall
will
calculate
greeks
for
to bewill
used
Returns
the
data
frame(t1)
to
Data
be
set
to
the
table
calls. bsput will do puts.
OPTIONS
the
calling data frame
Other for
parameters
greeks
further refer to
OPTIOSN$ID
theOPTIONS
column to
columns inisthe
processing.
loop
over
table.
• Cloud Specs
Results
• 72 cores
• Memory: 512GB
25
20
15
Avg. Time
10
Min. Time
Max. Time
5
0
Oracle BIWA Summit 2017
What Comes Next?
Or being done that I can’t speak about.
• Develop Predictive Models based on the Greeks
• Embed into models into other applications
• Build real time recommendation engine
• Leverage Stream Analytics
• Leverage Hadoop
• Research papers/Text Analytics
Oracle BIWA Summit 2017
Shameless Oracle Plug
Big Data & Analytics
Analytic
Sprint
Our Data Scientists can help you for a specific use-case.
Business Case
Executive
Discovery
Architecture &
Executive
Commitment
Session
Roadmap
Readout
Analytic Sprint
Oracle BIWA Summit 2017
Deploy
Big Data & Data Science Advisory Services
Get in touch with us!
Email: [email protected]
Oracle External: https://www.oracle.com/big-data
Oracle Internal: http://bdcoe.us.oracle.com
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle Confidential - Restricted
Oracle BIWA Summit 2017