ffn
ffn copied to clipboard
ffn - a financial function library for Python
Using 849 data points and 1188 calendar days between start and end, an error is thrown in the calculation of yearly kurtosis. A runtime warning is given as shown below....
Hi, Im using bt for backtesting (great tool btw) and im exploring crypto data which trades 365 days a year. I made `ffn.core. TRADING_DAYS_PER_YEAR` equal to 365 and when I...
Evaluate what functionality empyrical has that ffn is missing and consider implementing as empyrical is not really maintained. https://github.com/quantopian/empyrical https://github.com/quantopian/empyrical/issues/125
```if r.index.to_series().diff().min() < pd.Timedelta("2 days"): self.daily_mean = r.mean() * 252 self.daily_vol = np.std(r, ddof=1) * np.sqrt(252) # if type(self.rf) is float: if isinstance(self.rf, float): self.daily_sharpe = r.calc_sharpe(rf=self.rf, nperiods=252) self.daily_sortino =...
Line 2302: ``` res = np.divide(er.mean(), std)``` Unless I'm reading this incorrectly, this is using the mean instead of geometric mean which is incorrect (should be .gmean(), right).
I used monthly data and checked the performance. I always come to the result that with "six_month" the last 7 lines are calculated. otherwise, I do not come to the...
Hello, I'm using Python 3.8 and PyCharm 2021.1.1. When I use ffn (0.3.6) to get aapl ticker using the following code: import ffn dataset_ffn = ffn.get('aapl', start='2018-01-01') dataset_ffn.columns = ["open",...
I feel like I have to be missing something here.. this seems too obvious of an issue. In to_log_returns() the statement is: `np.log(prices / prices.shift(1))` .shift produces NaN as the...
When having a multi-column data set such as: SYM1 SYM2 Date 2020-01-01 1000.000000 1000.000000 2020-02-01 1000.000000 1000.000000 2020-02-15 NaN 1005.000000 2020-03-01 1010.000000 1015.050000 2020-04-01 1010.000000 1015.050000 2020-05-01 1020.100000 1025.200500 2020-06-01...