Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Adriano
@rsvp
Updated notebook on realized geometric returns https://git.io/georet which now uses the new more accurate gemrat() function, see https://git.io/gmix -- the section on monthly geometric returns is insightful for asset allocation: comparison across real estate, stocks, bonds, gold, and FX from the viewpoint of USD-based investor.
Adriano
@rsvp
The current Fed Funds range is between 100 and 125 bp. Our forefunds('17u', '18u') is forecasting 146 bp one year out, thus only one more rate hike is expected. Most expect this to happen in December 2017. As for bonds, FOMC is willing to start reducing holdings on its balance sheet, i.e. reverse quantitative easing.
Adriano
@rsvp

Our inflation measure is a composite of CPI and PCE, both core and headline versions for each.

>>> infl = get(m4infl)
>>> roundit(gemrat(infl['2015':], yearly=12))
[1.6045, 1.6052, 0.3525, 5.8699, 12, 28]

The volatility is so low (0.35%) that the geometric and arithmetic rates of inflation are very close: 1.6%. The Fed target is 2%, core PCE basis, so they are currently off by about 1 standard deviation. Yellen in her recent testimony seemed puzzled given the labor market situation.

To score the Federal Reserve's performance under its dual mandate for inflation and unemployment, rerun this Jupyter notebook using current data, https://git.io/fed

esvhd
@esvhd
@rsvp, thank you for the great set of notebooks. On the fed score, love it by the way, I am wondering if the z-scoring of inflation should take a short time horizon, due to the fact that due to structural changes, inflation series far behind most likely is not relevant. therefore including the hyper-inflation periods would optically depress the inflation z-scores. Perhaps I can try a trailing 10yr scoring for inflation? What do you think?
Adriano
@rsvp
hi @esvhd thanks! The notebooks are just proof of concept for the algos, "usage examples." You are seeking short-term memory, so one could window the dataframe[t-w:t] for fixed window size w as time rolls forward. Any sort of filtering should apply to the inflation as well as the unemployment side. The Fed policy objectives also change over time, but our notebook depicts them as being constant. Thus any localized evaluation should account for that, just to be more fair.
Adriano
@rsvp
NEW RELEASE v5.17.0722: We develop an alternative to the Markowitz framework called Boltzmann portfolios which handle uncertainty from the standpoint of cross-entropy and optimal sequential decisions. The improved result is a faster online algorithm which is more robust. Markowitz portfolios are designed in the arithmetic mean-variance framework for a static period, and are fragile to changing market conditions. In contrast, Boltzmann portfolios are adaptive over multi-periods to geometrically maximize wealth using techniques from reinforcement learning. Part 1: https://git.io/boltz1 Part 2: https://git.io/boltz2
esvhd
@esvhd
Hi @rsvp thanks for the reply! Sorry took me a while to get back. Indeed, the objectives do vary with time, like now, infltaion is more of the driver than unemployment. Congrats for the new release!
Adriano
@rsvp

Insomnia last night, created this word cloud: https://git.io/fecon235words :worried:

fecon235-wordclouds.jpg

Adriano
@rsvp
In https://git.io/oil we examine the crude oil markets, specifically the Brent over WTI spread, and construct an optimal Boltzmann portfolio. Deflated time-series indicates $20 in current dollars as bottom support. Grim for oil companies whose break-even point is around $47.
Adriano
@rsvp

Re: #2 -- Git shell script to list commit dates, given path/filename(s)

The system's modification time for a committed file may not
be the actual commit date and time!
This can be verified
if you checkout an older branch and switch back.

There is no nice builtin git utility, so I wrote one:
https://git.io/git-lu

Adriano
@rsvp
@MaxBenChrist started awesome list for "python ecosystem contains different packages that can be used to process time series": https://github.com/MaxBenChrist/awesome_time_series_in_python
Maximilian Christ
@MaxBenChrist
@rsvp Thank you for adding me to this room.
I am overwhelmed by the scope of your package. you really have a huge amount of examples.
is there a recommended starting point to read into the package?
Adriano
@rsvp
@MaxBenChrist hi Maximilian, the README.md gives some topics covered in the notebooks which then naturally introduces commands to explore the data. So curiosity will hopefully motivate the user to apply the tools in his own particular domain. But the tools themselves are only meant to be templates to be reshaped. Just dive in, and have fun!
Adriano
@rsvp
@femtotrader @jreback hi, could you kindly update us regarding pandas_datareader and the recent API change/removal over at Yahoo Finance / Google Finance? If they both become discontinued, what are alternate sources for data on equities and indexes? cf. /r/algotrading
Adriano
@rsvp
Opened issue with details: Disruption of equities data :: pandas_datareader dependency on Yahoo and Google Finance API, please comment at rsvp/fecon235#7
Adriano
@rsvp
NetBSD ported fecon235 as a Unix package: http://pkgsrc.se/finance/py-fecon235 -- open source, wow! Thanks to cross-platform compatibility.
Adriano
@rsvp
Moment-free, unbiased, efficient and robust estimator of Sharpe ratios both for Gaussian and heavy-tailed leptokurkotic price returns: https://github.com/amirsani/pySharpeRratio -- the key is the duration of drawdowns.
Adriano
@rsvp

Fed Funds forecast one-year out is 1.50% using forefunds('17z', '18z') so if the street is right about a rate hike at the December 13 presser, then 2018 looks like a very flat year in terms of US interest rates.

[Please see https://git.io/fedfunds for forecasting the Fed Funds rate using futures contracts on LIBOR.]

Adriano
@rsvp

In terms of the US bond market, the Fed will begin to reduce its assets from QE, and thus the market sentiment is extremely bearish. As evidence, here is the plot of get(w4cotr_bonds) which translates data from the CFTC Commitment of Traders Reports:
tmp-17u26-w4cotr_bonds.png

[The notebook https://git.io/cotr discerns how various asset classes are positioned in the market.] So overall for 2018, the yield curve is more likely to widen.

Adriano
@rsvp
fecon235 package for Linux: Arch, Debian, FreeBSD, etc. https://repology.org/metapackage/python:fecon235/information
Abkane23
@Abkane23
Hello! I've been trying to install the fecon235 package through the anaconda prompt but I get an error saying to distributions recognized
Adriano
@rsvp
@Abkane23 hi, fecon235 is not a conda package, but you got over the hard bump which is installing Anaconda, congrats! Now for the easy fecon235 installation FAQ, please see https://git.io/econ -- thus only git is needed to install and to pull updates.
Rishi
@RishiPSingh_twitter
Hi all - I'm Rishi founder of tiingo.com. I was told by a few members of the community some were looking to for data replacements. The api is available at https://api.tiingo.com. Will take a look at the repo tomorrow and see where I can help to provide optimizations and also make the API play nicely. rsvp/fecon235#7 . In the interim, looking forward to learning about everyone here. If anybody has some algo questions let me know. Was the first employee at AlphaParity, traded exotics, and treasuries, and built trading systems that realized sharpe of 2 on about 150mm before leaving that world. Will try to help where I can. Goodnight all.
Adriano
@rsvp
@RishiPSingh_twitter hi Rishi, I noticed the free API for Tiingo permits up to 20,000 requests per day on over 56,000 securities globally -- that's quite generous -- and thanks very much for your offer to help on our repo.
Rishi
@RishiPSingh_twitter
Ah - its limited to 500 tickers of your choice which is the only limit on that. My goal is to make it disruptive but also a sustainable business. So as time continues, we can keep offering more but keep prices as constant as possible. For those of you who want access to the crypto feed let me know. it does a few things that I think are important and often missed - like syncing the exchanges and keeping track of drifts of timestamps. E.g. one crypto exchange says trades are done 1-2 seconds in the future, let alone counting for the latency to pass the data over the internet
I want the API to exist a long time and be reliable but also be absurdly cheap :D
Adriano
@rsvp

@RishiPSingh_twitter Can the set of freebie Tiingo tickers be ETFs? For then we can get a nice span.

Time sync among the cryptocurrencies is important. There are a few interested in arb via the Bellman-Ford graph.

Adriano
@rsvp
hi, please comment here on APIs from various data vendors, esp. for equities data. For details, please see rsvp/fecon235#7 re: Disruption of equities data, due to pandas_datareader dependency on Yahoo and Google Finance, or simply emoji on the "Alternatives" to express your reactions. Based on your feedback, I will expand our get() function. Thank you!
Adriano
@rsvp
Here's a curated list of awesome libraries, packages and resources for Quantitative Finance: https://github.com/wilsonfreitas/awesome-quant -- Thanks @wilsonfreitas
Adriano
@rsvp
Treasury bonds can be summarized as having weighted average maturity of 5.73 years at 2.15% interest rate: see updated https://git.io/debtpop for more on US government debt.
Adriano
@rsvp
Expecting Bitcoin futures to start trading at the CME by mid-December. The contract size is 5 BTC. Initial margin estimated to be around 25 to 30%. Any hurry to see a notebook on this topic? The contango/backwardation should be interesting. No options on futures are planned for now.
Adriano
@rsvp
Update: Bitcoin futures approved by CFTC on two exchanges: Cboe and CME. Trading to start Dec 18 at CME with initial margin at 35% (note that hard daily price limits are set at +/- 20%).
Adriano
@rsvp
Update: Cboe Bitcoin futures to start trading Dec 10, contract multiplier is 1 bitcoin, see XBT specs. // Wondering if the CME's EFP facility will swap Cboe contracts as arb?
Adriano
@rsvp
Cboe Bitcoin futures: Initial margin estimated to be around 44%.
As of 2017-12-11T00:14:36Z, the volume so far 67 contracts, last price $15,730 for Jan 17 expiration. See http://cfe.cboe.com/cfe-products/xbt-cboe-bitcoin-futures
Adriano
@rsvp
Reminder: In our fecon235 notebook https://git.io/xbt Bitcoin is statistically analyzed as a financial asset. Just update it to get the latest volatility estimates.
Adriano
@rsvp
2017-12-11T04:14:10Z Cboe XBT/F8 Jan $18,380 on volume of 2091 contracts. Price has zoomed up 16.9% in the last four hours! Imagine the annualized volatility over tick data.
Adriano
@rsvp
2017-12-12T18:28:17Z Cboe XBT spread between H8 and F8, 18680.00-18545.00 implies annualized contango of +4.37% for Bitcoin, based on 85 contracts.
Adriano
@rsvp
Fed hike +25 bp as predicted, Fed Funds range: 125 to 150. Expecting some variation from the new Chair next year.
Adriano
@rsvp
CME Bitcoin futures, symbol BTC, has started up http://www.cmegroup.com/trading/bitcoin-futures.html -- in the first four hours 163 contracts traded on Globex, only for F8, i.e. the last Friday of January 2018.
Adriano
@rsvp
CME BTC spread between H8 and F8, 19270-19100 at settlement yesterday implies annualized contango of +5.34% for Bitcoin. Quotes and charts: http://www.cmegroup.com/trading/equity-index/us-index/bitcoin.html
Adriano
@rsvp
CME has raised their initial margin on BTC from 35% to 47%, quite understandably given the recent extreme volatility.
Brian
@BlackArbsCEO
I just read the notebooks on gaussian mixtures and boltzmann portfolios. I found it very informative and plan to implement some of the techniques. I have a couple questions about it:
  1. How has the boltzmann portfolio approach, performed in the wild OOS?
  2. Are the notebooks for parts 3 and 4 created yet?
  3. Who(where) should I contact(post) if I have more questions about the underlying mathematics and its interpretation?
Adriano
@rsvp
@BlackArbsCEO hi Brian, Boltzmann portfolios quantify risk more accurately than the usual Gaussian-based approach, and they are designed not to overfit the noise in the covariance matrix -- thus they perform better out-of-sample. Part 1: https://git.io/boltz1 Part 2: https://git.io/boltz2 Part 3 is not yet public: it covers the hyperparametization for intertemporal usage. Part 4 on the mathematics may point to a forthcoming paper instead of a Jupyter notebook. Post your questions here, many are happy to help.
Adriano
@rsvp

The pre-Xmas decline of over 25% in Bitcoin price in less than 24 hours induced a backwardation in futures pricing relative to spot. Easy to imagine a trading strategy somewhat like a put, given the borrowing rate against such assets.

But is it hard to imagine a call option one-year out at $50,000 strike? Some institution paid close to a million dollars in premiums last Wednesday for notional 275 Bitcoins (source: LedgerX CEO Paul Chou). The usual Black-* models should avoided to price this option, for the stochastic process is extremely non-Gaussian (Levy).

Brian
@BlackArbsCEO
@rsvp how would you/your team like to be credited/attributed for the work that you have done? I plan to build on, test, and incorporate your boltzmann portfolio approach in future projects and want to make sure I give proper credit where it is due.
Adriano
@rsvp
@BlackArbsCEO hi Brian, that's terrific -- just mention the repository at https://git.io/fecon235 which cites some acknowledgements. Your blog posts are very interesting, so we will look forward to your insights. How did your backtesting for Boltzmann portfolios turn out? Hope you figured out how to adapt the framework to statistical arbitrage... Happy Holidays!
Adriano
@rsvp
2017-12-30T02:23:14Z CME BTC spread between H8 and F8, 13970-13745 at settlement implies annualized contango of +9.82% for Bitcoin. Volume on the H8 side was 64 contracts, equivalent to 320 Bitcoins notional.
Adriano
@rsvp
2018-01-06T19:12:39Z CME BTC spread between H8 and F8, 16780-16790 implies annualized contango of -0.36% for Bitcoin, i.e. backwardation, given price increase of 22% since last week. Open interest on the H8 side was 67 contracts. F8 contract continues trading until the third Friday this month.