0% found this document useful (0 votes)
28 views4 pages

Finansu Examples: Web: Static and Streaming Quotes

This document demonstrates various functions in FinAnSu including Quote(), LiveQuote() to retrieve stock prices from sources like Bloomberg and Google. It also shows using GoogleHistory() to retrieve historical stock data and parse it into a table. Additionally, it provides examples of calculating option Greeks using Black-Scholes and sorting arrays.

Uploaded by

vdsfs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Finansu Examples: Web: Static and Streaming Quotes

This document demonstrates various functions in FinAnSu including Quote(), LiveQuote() to retrieve stock prices from sources like Bloomberg and Google. It also shows using GoogleHistory() to retrieve historical stock data and parse it into a table. Additionally, it provides examples of calculating option Greeks using Black-Scholes and sorting arrays.

Uploaded by

vdsfs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 4

FinAnSu Examples: Web

Static and Streaming Quotes

This demonstrates the Quote() and LiveQuote() functions. Really, you can do everything with Quote(), but the difference is
in the defaults: Quote("goog") gets you Google's share price, while LiveQuote("goog") gets you Google's share price and
by default updates it every 15 seconds. Both functions default to Bloomberg and (if applicable) a 15 second update interval.

Description Security ID Source Params Live Updating? Frequency Show Headers? Value
3M LIBOR US0003M:IND Bloomberg p 0 0 #ADDIN?
6M LIBOR US0006M:IND Bloomberg p 0 0 #ADDIN?
12M LIBOR US0012M:IND Bloomberg p 0 0 #ADDIN?
Wells Fargo WFC Google p 1 5 0 #ADDIN?
Bank of America BAC Google v 1 5 0 #ADDIN?
Gold, Dec 2010 GCZ11.CMX Yahoo p 30 0 #ADDIN?
Corn, Dec 2010 ZCZ11.CBT Yahoo x 30 0 #ADDIN?
S&P 500 SPX:IND % 0 #ADDIN?

Detailed Quotes
Security ID WFC #ADDIN? #ADDIN? #ADDIN?
Source b #ADDIN? #ADDIN? #ADDIN?
Params #ADDIN?
Live Updating? 0
Frequency 300
Show Headers? 1

Custom Web Data

Utilizing the Import() function requires knowledge of regular expressions. The function simply navigates to the URL,
then parses the text according to a regular expression.

Regular Expression Quick Start

Description URL Regex Pattern Max Length Live Updating? Frequency Function Value
Bloomberg Headline http://www.bloomberg story_link">(.*?)< 1 0 Import #ADDIN?
.com/

Current FAS Version http://code.google.co FinAnSu\-((?:[0-9] 1 0 Import #ADDIN?


m/p/finansu/ {1,2}\.?){1,3})\.zip
FinAnSu Examples: History and CSV Parsing
Quote History

Security ID GOOG
Start Date 7/30/2017
End Date 8/8/2017
Period d
Params dohlcv
Show Headers 0
Date Order 0

=GoogleHistory(B5,B6,B7,B8,B9,B10,B11)
Date Open High Low Close Volume
#ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN?
#ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN?
#ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN?
#ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN?
#ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN? #ADDIN?
FinAnSu Examples: Math
Option Greeks

Call/put c
Stock price 60.00
Strike price 65.00
Time to expiry 0.25
Risk-free rate 8%
Dividend yield 0%
Volatility 30%

Black-Scholes price #ADDIN?


Implied volatility #ADDIN?

Delta #ADDIN?
Vega #ADDIN?
Theta #ADDIN?
Rho #ADDIN?
Gamma #ADDIN?
Vanna #ADDIN?
Charm #ADDIN?
Speed #ADDIN?
Zomma #ADDIN?
Color #ADDIN?
DvegaDtime #ADDIN?
Vomma #ADDIN?
FinAnSu Examples: Other
Auto Sorting Arrays

Unsorted Sorted
a 1.00 #ADDIN? #ADDIN?
b 2.50 #ADDIN? #ADDIN?
c 8.00 #ADDIN? #ADDIN?
d 3.00 #ADDIN? #ADDIN?
e 0.90 #ADDIN? #ADDIN?

You might also like