Presents how TachVault's fair value options prices can be instantly accessed from Web/Mobile devices or from Excel/VBA financial applications as shown in http://www.tachvault.com/downloadFilesAction.php?fileName=Option-Pricing.xlsm.
5. TachVault Pricing Engine
SaaS Web Service model
Much cheaper than in-house development
or licensing
Integration and scalability
You can easily integrate with any in-house
modeling tools (VBA, R, Python)
Scalable to support unlimited concurrent
requests and only limited by cloud
infrastructure
Work anywhere.
6. TachVault Pricing Engine
Our SaaS platform
Based on RESTful web services
TachVault is responsible for upgrades,
uptime and security
Can be integrated from any tools and third
party software
Follows simple syntax widely used by
most popular SaaS platforms
Syntax tab documents the SaaS request syntax
7. Value options with Web GUI
Target users
Option traders/investors with the need for
portable option valuation application
based on *real-time market data
* ~15 min delayed market data for equity and
FX in Free Trial
* Futures options are based on previous day
settlement prices in Free Trial
8. Value options with Web GUI
Key features
Can be accessed from any computing device
connected to the Internet
Provided with Catalog of option pricing
request templates
Request templates can be customized,
added to user collections and accessed from
anywhere
Ex: Call option request for Apple Inc. can be
created from equity vanilla option template
Stores history of requests in local browser
storage
10. Value options with Web GUI
Default Catalogs
Lists asset classes and option types
supported in Free Trial
Lists option valuation requests for each
asset class/option type supported as
templates
Click on the template request shows
possible lists of parameters and allowed
values
12. Value options with Web GUI
Selected request parameters (not
obvious)
_rateType: Allows a user to specify preferred
risk-free rate used in valuation
LIBOR or fed rate
_volType: Allows a user to select the type of
volatility modeling
Implied volatility (based on previous days historical
option prices)
Historical volatility (GARCH)
_vol: Allows user to specify a constant
volatility used in valuation (override value)
13. Value options with Web GUI
Selected request parameters (not
obvious)
_method: Allows a user to specify option
valuation method
Closed analytical, Binomial or Monte-Carlo
_legs: Allows a user specify legs of an option
spread
Syntax: (leg), (leg), (leg).
Ex: Butterfly spread legs
(_position=long,_option=call,_strike=145,_maturity=2015/11/20),(_position=long,_option
=call,_strike=165,_maturity=2015/11/20),(_position=short,_option=call,_strike=ATM,_m
aturity=2015/11/20),(_position=short,_option=call,_strike=ATM,_maturity=2015/11/20)
14. Value options with Web GUI
User collections
User collections allows users to organize
and store preferred option requests
User collections are stored with user
profile in the TachVault web server. Thus
can be accessed from anywhere
Users can:
Create a new collection
Ex: Financial equities, Tech sector equities
Add frequently exercised option requests to
chosen collections
16. Value options with Web GUI
Option valuation requests
Requests can be added to collections
Requests can be modified and saved
One can execute a request for option
valuation from any computing device on
the Internet
Valuation output:
Shown in human readable text formatted with
JSON syntax.
17. Value options with Web GUI
Option valuation output:
Main elements
Message:
outcome:
request: { }
response: { }
18. Value options with Web GUI
Main elements: Message, Outcome
Values of Message indicate whether the
request is successfully executed or not.
Possible Values: Success/Failure
Values of Outcome indicate the same
information as Message. But can be
easily compared by automated tools
0 indicate Success and 1 indicate Failure.
19. Value options with Web GUI
Main elements: Request
Request block indicates the request
parameters as received by the pricing
engine
Example:
"request": {
"equity symbol": "RY",
"maturityDate": "2016-Jan-15",
"option": "put",
"strike": 54.2,
"style": "american"
},
20. Value options with Web GUI
Main elements: Response
Response block shows the values of response
elements such as option Greeks and option price.
Example:
"response": {
"Volatility": 0.2504893407184784,
"greeks (BS)": {
"delta": -0.5034209714402521,
"gamma": 0.04761497137430514,
"theta": -3.943525425566568,
"vega": 0.2324708078992869
},
"last underlying price": 55.58,
"option price": "3.698",
"underlying trade date": "2015-Sep-09"
}
21. Value options with Web GUI
Plain Vanilla option response
Main elements.
greeks (BS) : {delta, gamma, theta, vega}
Greek values for the option based on Black Scholes
formula
last underlying price:
The price of underlying asset used in the option pricing
option price
The value of option
Volatility
Volatility for the given option maturity and strike price
underlying trade date
The trade date of underlying asset at the pricing point
22. Value options with Web GUI
Exotic option Response
Main elements.
greeks (BS) : {delta, omega, theta, vega}
Greek values for the option based on Black Scholes
last underlying price:
The price of underlying asset used in the option pricing
option price
The value of option
Volatility
Volatility for the given option maturity and strike price
Vanilla option price
The value of vanilla option
underlying trade date
The trade date of underlying asset.
23. Value options with Web GUI
Option spread Response
Main elements.
Legs: [leg, leg, leg]
Shows the option values of each leg as separate
blocks { }
greeks (BS) : {delta, omega, theta, vega}
Greek values for the option based on Black Scholes
last underlying price:
The price of underlying asset used in the option pricing
spread price
The value of spread
underlying trade date
The trade date of underlying asset.
24. Coming up..
Part II of Getting Started series will
explain integration of TachVault web
services API with Excel/VBA.
25. Getting Started with Web
Service API Part II
Integration of TachVault web
services API with Excel/VBA
26. Outline
Excel-VBA Web Service Framework
VBA-Web Library
Example I: Pricing and Sensitivity
Analysis of Vanilla options
Example II: Pricing Equity Asian
options
Example III: Pricing Futures option
spreads
27. Excel-VBA Web Service
Framework
Pricing Engine
REST
Server
Market
Data feed
Option Request
Pricing
Response
Your Excel
Derivative App
TachVault Pricing
Engine
29. VBA-Web Library
Open source VBA library for REST
client
Reference: https://github.com/VBA-
tools/VBA-Web
What tools I need to get started?
You only need the VBA modules
embedded in the Option-Pricing.xlsm
Excel workbook linked as the Demo Excel
Client here.
30. Example I: Pricing and
Sensitivity Analysis of Vanilla
options
Construct a VBA-Web WebClient
Public Property Get Client() As WebClient
If pClient Is Nothing Then
Set pClient = New WebClient
pClient.BaseUrl = http://cp.saas-
tachvault.com/JSON/EquityOption/Vanilla
End If
Set Client = pClient
End Property
31. Example I: Pricing and
Sensitivity Analysis of Vanilla
options
Construct Request with required
parameters
Public Function PriceAPI(Req As VanillaOptionReq) As WebResponse
Dim Request As New WebRequest
Request.AddQuerystringParam "_option", Req.optionType
Request.AddQuerystringParam "_symbol", Req.symbol
Request.AddQuerystringParam "_strike", Req.strike
Dim mat As String
mat = Format(Req.maturity, "yyyy/mm/dd")
Request.AddQuerystringParam "_maturity", mat
Request.AddQuerystringParam "_ratetype", Req.rateType
Request.AddQuerystringParam "_token", Req.Token
Request.AddQuerystringParam "_style", Req.style
Request.AddQuerystringParam "_volType", Req.volType
Request.AddQuerystringParam "_vol", Req.vol
32. Example I: Pricing and
Sensitivity Analysis of Vanilla
options
Send request to TachVault pricing
engine
Public Function PriceAPI(Req As VanillaOptionReq) As WebResponse
Dim Request As New WebRequest
Request.AddQuerystringParam "_option", Req.optionType
Request.AddQuerystringParam "_symbol", Req.symbol
Request.AddQuerystringParam "_strike", Req.strike
Dim mat As String
mat = Format(Req.maturity, "yyyy/mm/dd")
Request.AddQuerystringParam "_maturity", mat
Request.AddQuerystringParam "_ratetype", Req.rateType
Request.AddQuerystringParam "_token", Req.Token
Request.AddQuerystringParam "_style", Req.style
Request.AddQuerystringParam "_volType", Req.volType
Request.AddQuerystringParam "_vol", Req.vol
Set PriceAPI = Client.Execute(Request)
End Function
33. Example I: Pricing and
Sensitivity Analysis of Vanilla
options
Process the response (in JSON
format)
Set Response = EquityVanilla.PriceAPI(Req)
If Response.StatusCode = WebStatusCode.Ok Then
Me.[Volatility] = Response.Data("response")("Volatility")
Me.[option_price] = Response.Data("response")("option price")
Me.[Underlying] = Response.Data("response")("last underlying
price")
Me.[OutStrike] = Req.strike
Me.[OutMaturity] = Req.maturity
Me.[Delta] = Response.Data("response")("greeks (BS)")("delta")
Me.[Gamma] = Response.Data("response")("greeks
(BS)")("gamma")
Me.[Theta] = Response.Data("response")("greeks (BS)")("theta")
Me.[Vega] = Response.Data("response")("greeks (BS)")("vega")
Me.[Message] = Response.Data("Message")
Else
Me.[Message] = "Error: " & Response.Data("Message")
34. Example II: Pricing Equity Asian
options
Construct a Web client with the URL:
pClient.BaseUrl = "http://cp.saas-
tachvault.com/JSON/EquityOption/Average"
Populate the Request with required
parameters
Public Function PriceAPI(Req As AverageOptionReq) As WebResponse
Dim Request As New WebRequest
Request.AddQuerystringParam "_option", Req.optionType
Request.AddQuerystringParam "_averageType", Req.averageType
Request.AddQuerystringParam "_symbol", Req.symbol
Request.AddQuerystringParam "_strike", Req.strike
Dim mat As String
mat = Format(Req.maturity, "yyyy/mm/dd")
Request.AddQuerystringParam "_maturity", mat
Request.AddQuerystringParam "_ratetype", Req.rateType
Request.AddQuerystringParam "_token", Req.Token
Request.AddQuerystringParam "_style", Req.style
Request.AddQuerystringParam "_volType", Req.volType
Request.AddQuerystringParam "_vol", Req.vol
35. Example II: Pricing Equity Asian
options
Send request to TachVault Pricing
engine REST server
Public Function PriceAPI(Req As AverageOptionReq) As WebResponse
Dim Request As New WebRequest
Request.AddQuerystringParam "_option", Req.optionType
Request.AddQuerystringParam "_averageType", Req.averageType
Request.AddQuerystringParam "_symbol", Req.symbol
Request.AddQuerystringParam "_strike", Req.strike
Dim mat As String
mat = Format(Req.maturity, "yyyy/mm/dd")
Request.AddQuerystringParam "_maturity", mat
Request.AddQuerystringParam "_ratetype", Req.rateType
Request.AddQuerystringParam "_token", Req.Token
Request.AddQuerystringParam "_style", Req.style
Request.AddQuerystringParam "_volType", Req.volType
Request.AddQuerystringParam "_vol", Req.vol
Set PriceAPI = Client.Execute(Request)
End Function
36. Example II: Pricing Equity Asian
options
Process the Response (in JSON
format)
Set Response = EquityAverage.PriceAPI(Req)
If Response.StatusCode = WebStatusCode.Ok Then
Me.[aVolatility] = Response.Data("response")("Volatility")
Me.[aPrice] = Response.Data("response")("average option price")
Me.[aUnderlying] = Response.Data("response")("last underlying
price")
Me.[aOutStrike] = Req.strike
Me.[aMessage] = Response.Data("Message")
Else
Me.[aMessage] = "Error: " & Response.Data("Message")
End If
37. Example III: Pricing Futures
option spread
Construct the Web Client with the URL
for futures Option spread
Populate the Request with required
parameters
Send the request to TachVault pricing
engine REST server
Process the Response as for the
Vanilla option
38. General Access Framework
Construct the Web Client with the URL
specific for each option family
The URL paths indicate the type of option
family: Equity vanilla, Futures Spread,
FXBarrier, etc.
Populate the Request with required
parameters
Most of the parameters are specific to
each option family and the rest are
common such as _rateType and _volType
39. General Access Framework
Send the request to TachVault pricing
engine
Most of the parameters are specific to
each option family and the rest are
common such as _rateType and _volType
Process the JSON Response
40. Exception Handling
Handle Pricing engine exceptions
All exceptions in pricing engine are
channeled to clients.
REST Status Code equals Internal error
Indicate error in processing
The Message response parameter indicate
the human readable error message
VBA-Web module WebResponse
captures the status code and message.
How to check?
If Response.StatusCode = WebStatusCode.Ok Then
41. References
The Excel demo workbook for pricing options can
be found here.
http://tachvault.com/demo/Option-Pricing.xlsm
The Power Point presentation can be found in
here.
http://tachvault.com/demo/GettingStartedWebServiceAPI-
Part-II.pdf
42. Coming up..
Part III of Getting Started series will
explain integration of TachVault web
services API with Python.