-
-
Notifications
You must be signed in to change notification settings - Fork 160
General Usage
All Optopsy functions are exposed in the optopsy.* namespace, please consult the sidebar to see API reference for all option strategies currently supported.
Optopsy does not fetch or maintain your dataset, you are free to use data from anywhere as you require. All of Optopsy's strategy functions expect a pandas DataFrame as the first parameter with the following columns and data types:
- underlying_symbol (object)
- underlying_price (float64)
- option_type (object, str starting with "c" or "p" for "call"/"put" options)
- expiration (datetime64[ns])
- quote_date (datetime64[ns])
- strike (int64 or float64)
- bid (float64)
- ask (float64)
If your dataset is already in a pandas DataFrame with the exact headings above, you should not need to do any extra work before calling Optopsy functions. However, if your dataset is from a CSV file and not setup as above, you can use Optopsy's provided convenience function csv_data()
to help convert your CSV data. Please consult the API reference on how to use this function.
Copyright © 2020, Michael Chu