This new release contains **intraday historical data** which makes it possible to calculate Risk, Performance and Technical metrics based on a 1 min, 5 min, 15 min, 30 min or 1 hour interval. For example, you can obtain the Capital Asset Pricing Model (CAPM) per model in which it calculates the beta for each hour.
<img src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/395b98b9-5b7a-4f8a-8185-e0c5fe1f4b14" width="500px">
Or for example Williams %R on an hourly basis as follows:
<img width="567" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/b7f953f3-6c40-498d-800d-4260dbeac600">
Next to that, I've done a lot of polishing. A user noticed that there were some issues with working with delisted companies. As Financial Modeling Prep allows you to get data on these companies whereas Yahoo Finance doesn't, I needed to make sure that the Finance Toolkit didn't attempt to query the Yahoo Finance and return an error. This has been resolved (all of these companies are delisted):
![image](https://github.com/JerBouma/FinanceToolkit/assets/46355364/28d998bb-935b-4170-909b-dfed1d062eee)
Furthermore, I've fixed small bugs, updated the documentation and more. All in all it should be a more pleasant experience!
v.1.8.0
It's time for another major release which consists of a full blown **Options menu** including all First, Second and Third Order Greeks such as Delta, Vega, Gamma, Theta and Ultima. Find the entire list of Greeks [here](https://github.com/JerBouma/FinanceToolkit?tab=readme-ov-file#options-and-greeks). Update your Finance Toolkit now with:
bash
pip install financetoolkit -U
Based on the Black Scholes formula, it is now possible to get theoretical option prices and greeks for a range of stocks being able to plot charts such as the following:
![image](https://github.com/JerBouma/FinanceToolkit/assets/46355364/a0cd4275-8198-4edc-9f3d-eab006aacf07)
For example, the following code gets you all Greeks for Tesla.
python
from financetoolkit import Toolkit
toolkit = Toolkit(["TSLA", "MU"], api_key="FINANCIAL_MODELING_PREP_KEY")
all_greeks = toolkit.options.collect_all_greeks(start_date='2024-01-03')
all_greeks.loc['TSLA', '2024-01-04']
Which returns (Stock Price: 238.45, Volatility: 55.4%, Dividend Yield: 0.0% and Risk Free Rate: 3.91%):
| Strike Price | Delta | Dual Delta | Vega | Theta | Rho | Epsilon | Lambda | Gamma | Dual Gamma | Vanna | Charm | Vomma | Vera | Veta | PD | Speed | Zomma | Color | Ultima |
|---------------:|--------:|-------------:|-------:|--------:|-------:|----------:|---------:|--------:|-------------:|--------:|---------:|--------:|--------:|----------:|-------:|--------:|--------:|--------:|---------:|
| 180 | 1 | -0.9999 | 0 | -0.0193 | 0.4931 | -0.6533 | 4.0782 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | 0 |
| 185 | 1 | -0.9999 | 0 | -0.0198 | 0.5068 | -0.6533 | 4.4595 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | 0 |
| 190 | 1 | -0.9999 | 0 | -0.0204 | 0.5205 | -0.6533 | 4.9195 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | 0 |
| 195 | 1 | -0.9999 | 0 | -0.0209 | 0.5342 | -0.6533 | 5.4853 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | -0 | 0 | 0 | 0 |
| 200 | 1 | -0.9999 | 0 | -0.0214 | 0.5479 | -0.6533 | 6.1981 | 0 | 0 | -0 | 0 | 0 | -0 | 0.0012 | 0 | -0 | 0 | 0 | 0 |
| 205 | 1 | -0.9999 | 0 | -0.022 | 0.5616 | -0.6533 | 7.1239 | 0 | 0 | -0 | 0.0004 | 0.0003 | -0 | 0.1071 | 0 | -0 | 0 | 0.0003 | 0.0001 |
| 210 | 1 | -0.9999 | 0 | -0.0226 | 0.5753 | -0.6533 | 8.3747 | 0 | 0 | -0.0002 | 0.0199 | 0.0108 | -0.0001 | 4.1973 | 0 | -0 | 0.0001 | 0.012 | 0.0032 |
| 215 | 0.9998 | -0.9997 | 0.0001 | -0.0252 | 0.5889 | -0.6532 | 10.1567 | 0.0001 | 0.0001 | -0.0041 | 0.414 | 0.1838 | -0.0027 | 72.9841 | 0.0001 | -0 | 0.002 | 0.198 | 0.0324 |
| 220 | 0.9974 | -0.9971 | 0.001 | -0.0512 | 0.601 | -0.6516 | 12.8704 | 0.0012 | 0.0014 | -0.04 | 4.0384 | 1.3972 | -0.0264 | 580.934 | 0.0014 | -0.0005 | 0.0141 | 1.4208 | 0.1193 |
| 225 | 0.9783 | -0.9767 | 0.0065 | -0.2027 | 0.6021 | -0.6391 | 17.2415 | 0.0075 | 0.0084 | -0.1863 | 18.7659 | 4.6975 | -0.1235 | 2158.08 | 0.0084 | -0.0022 | 0.0409 | 4.115 | 0.0867 |
| 230 | 0.8966 | -0.8912 | 0.0224 | -0.6437 | 0.5616 | -0.5857 | 24.2406 | 0.026 | 0.028 | -0.4003 | 40.2357 | 6.3078 | -0.2677 | 3809 | 0.028 | -0.0049 | 0.0261 | 2.5995 | -0.1644 |
| 235 | 0.6987 | -0.6885 | 0.0435 | -1.2217 | 0.4433 | -0.4565 | 34.5702 | 0.0504 | 0.0519 | -0.3092 | 30.7944 | 2.0098 | -0.2139 | 3626.75 | 0.0519 | -0.004 | -0.0676 | -6.8748 | -0.0997 |
| 240 | 0.4187 | -0.4074 | 0.0488 | -1.361 | 0.2679 | -0.2735 | 48.191 | 0.0565 | 0.0558 | 0.1652 | -17.2254 | 0.4231 | 0.0945 | 3408.71 | 0.0558 | 0.0014 | -0.0971 | -9.7985 | -0.0227 |
| 245 | 0.1798 | -0.1722 | 0.0327 | -0.911 | 0.1156 | -0.1174 | 64.4551 | 0.0379 | 0.0359 | 0.4473 | -45.5831 | 5.1158 | 0.2833 | 4082.47 | 0.0359 | 0.0049 | -0.0092 | -0.8794 | -0.1971 |
| 250 | 0.0534 | -0.0503 | 0.0136 | -0.3769 | 0.0344 | -0.0349 | 82.5525 | 0.0157 | 0.0143 | 0.322 | -32.7 | 6.4816 | 0.2066 | 3305.97 | 0.0143 | 0.0036 | 0.0467 | 4.7605 | -0.0412 |
| 255 | 0.0108 | -0.01 | 0.0036 | -0.0992 | 0.007 | -0.0071 | 101.798 | 0.0041 | 0.0036 | 0.12 | -12.1728 | 3.4389 | 0.0774 | 1510.91 | 0.0036 | 0.0014 | 0.0324 | 3.2868 | 0.1451 |
| 260 | 0.0015 | -0.0014 | 0.0006 | -0.017 | 0.001 | -0.001 | 121.702 | 0.0007 | 0.0006 | 0.0266 | -2.6915 | 0.9828 | 0.0172 | 404.445 | 0.0006 | 0.0003 | 0.0101 | 1.0246 | 0.1043 |
| 265 | 0.0001 | -0.0001 | 0.0001 | -0.002 | 0.0001 | -0.0001 | 141.935 | 0.0001 | 0.0001 | 0.0037 | -0.3769 | 0.1682 | 0.0024 | 66.8956 | 0.0001 | 0 | 0.0018 | 0.1826 | 0.031 |
| 270 | 0 | -0 | 0 | -0.0002 | 0 | -0 | 162.286 | 0 | 0 | 0.0003 | -0.0349 | 0.0183 | 0.0002 | 7.148 | 0 | 0 | 0.0002 | 0.0203 | 0.0051 |
| 275 | 0 | -0 | 0 | -0 | 0 | -0 | 182.618 | 0 | 0 | 0 | -0.0022 | 0.0013 | 0 | 0.5115 | 0 | 0 | 0 | 0.0015 | 0.0005 |
| 280 | 0 | -0 | 0 | -0 | 0 | -0 | 202.841 | 0 | 0 | 0 | -0.0001 | 0.0001 | 0 | 0.0253 | 0 | 0 | 0 | 0.0001 | 0 |
| 285 | 0 | -0 | 0 | -0 | 0 | -0 | 222.899 | 0 | 0 | 0 | -0 | 0 | 0 | 0.0009 | 0 | 0 | 0 | 0 | 0 |
| 290 | 0 | -0 | 0 | -0 | 0 | -0 | 242.753 | 0 | 0 | 0 | -0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 295 | 0 | -0 | 0 | -0 | 0 | -0 | 262.382 | 0 | 0 | 0 | -0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Here, it automatically creates Strike Prices around the current stock price (or any price in the past if you change the start_date) parameter as well as plots forward for the time to expiration. Things that you can change with ease yourself if you like. For example:
python
from financetoolkit import Toolkit
toolkit = Toolkit(["MSFT", "ASML"], api_key="FINANCIAL_MODELING_PREP_KEY")
rho = toolkit.options.get_rho(
start_date="2020-01-02",
strike_price_range=0.15,
expiration_time_range=20,
put_option=True,
show_input_info=True
)
rho.loc['MSFT']
Which returns:
text
Based on the period 2013-01-22 to 2024-01-17 the following parameters were used:
Stock Price: ASML (291.79), Benchmark (305.06), MSFT (154.78)