The wallstreetflets Reference Manual

This is the wallstreetflets Reference Manual, version 1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:04:54 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 wallstreetflets

Wall Street FLETs: A library for calculating Options Greeks

Author

Nathan Van Ymeren <>

License

GPL v3

Version

1.1

Dependencies
  • lquery (system).
  • dexador (system).
  • parse-number (system).
Source

wallstreetflets.asd.

Child Component

wallstreetflets.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 wallstreetflets/wallstreetflets.asd

Source

wallstreetflets.asd.

Parent Component

wallstreetflets (system).

ASDF Systems

wallstreetflets.


3.1.2 wallstreetflets/wallstreetflets.lisp

Source

wallstreetflets.asd.

Parent Component

wallstreetflets (system).

Packages

wallstreetflets.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 wallstreetflets

Wall Street FLETs: Calculate Options Greeks based on scraped data

Source

wallstreetflets.lisp.

Nickname

wsf

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *fallback-rate*
Package

wallstreetflets.

Source

wallstreetflets.lisp.


5.1.2 Ordinary functions

Function: compute-greeks (volatility strike-price spot-price days-to-expiry &optional put)

Computes the Greeks for the given Option, as specified by the arguments, and returns them as a plist. The final argument is optional and if set to T (true) will compute a Put option, otherwise a Call is assumed. For a function that prints the calculated Greeks to stdout see PRINT-GREEKS

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: print-greeks (volatility strike-price spot-price days-to-expiry &optional put)

Computes the Greeks for the given Option and prints them to stdout. If you want to consume this info programmatically then you probably want the function COMPUTE-GREEKS

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: risk-free-rate (term)
Package

wallstreetflets.

Source

wallstreetflets.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *six-sigma*
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Special Variable: *url*
Package

wallstreetflets.

Source

wallstreetflets.lisp.


5.2.2 Ordinary functions

Function: avg (a &rest rest)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: condition-rate-list (rate-list)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: d-one (spot sigma strike r dte)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: d-two (sigma dte d1)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: delta (d1 &optional put)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: fetch-yield-rates ()

Scrapes US Treasury Bond yields for interpolation in another function

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: gamma (d1 sigma spot tau)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: gaussian-cdf (lo hi)

Numeric approximation of the CDF of a gaussian/normal distribution

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: gaussian-pdf (x)

PDF of the Standard Gaussian/Normal distribution

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: interpolate-rate (term)

Expects a time-to-maturity/days-to-expiry value in calendar days

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: linear-interpolate (x x0 x1 y0 y1)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: rho (d2 strike r tau &optional put)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: theta (d1 d2 spot strike tau sigma r &optional put)
Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: trap-int (f lo hi &key steps)

Trapezoidal integral approximation

Package

wallstreetflets.

Source

wallstreetflets.lisp.

Function: vega (d1 spot tau)
Package

wallstreetflets.

Source

wallstreetflets.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   C   D   F   G   I   L   P   R   T   V  
Index Entry  Section

A
avg: Private ordinary functions

C
compute-greeks: Public ordinary functions
condition-rate-list: Private ordinary functions

D
d-one: Private ordinary functions
d-two: Private ordinary functions
delta: Private ordinary functions

F
fetch-yield-rates: Private ordinary functions
Function, avg: Private ordinary functions
Function, compute-greeks: Public ordinary functions
Function, condition-rate-list: Private ordinary functions
Function, d-one: Private ordinary functions
Function, d-two: Private ordinary functions
Function, delta: Private ordinary functions
Function, fetch-yield-rates: Private ordinary functions
Function, gamma: Private ordinary functions
Function, gaussian-cdf: Private ordinary functions
Function, gaussian-pdf: Private ordinary functions
Function, interpolate-rate: Private ordinary functions
Function, linear-interpolate: Private ordinary functions
Function, print-greeks: Public ordinary functions
Function, rho: Private ordinary functions
Function, risk-free-rate: Public ordinary functions
Function, theta: Private ordinary functions
Function, trap-int: Private ordinary functions
Function, vega: Private ordinary functions

G
gamma: Private ordinary functions
gaussian-cdf: Private ordinary functions
gaussian-pdf: Private ordinary functions

I
interpolate-rate: Private ordinary functions

L
linear-interpolate: Private ordinary functions

P
print-greeks: Public ordinary functions

R
rho: Private ordinary functions
risk-free-rate: Public ordinary functions

T
theta: Private ordinary functions
trap-int: Private ordinary functions

V
vega: Private ordinary functions