Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Mark Song
@lnsongxf
Hi, I just want to know how to install fecon235, I tried "pip install fecon235", but it doesn't work. Thx.
Adriano
@rsvp

@lnsongxf hi, the preferred way for installation is just to clone the project under a directory in your PYTHONPATH. Best way to establish that editable variable is installing Anaconda beforehand which will resolve complex package dependencies. Then https://git.io/fecon-intro will help. Please message me if there are any other problems -- will revise the documentation accordingly.

Another way is non-native but direct cross-platform, Docker container : https://hub.docker.com/r/rsvp/fecon235/ -- Anaconda and git are pre-installed so just pull from origin/master to get latest fecon235 updates.

Adriano
@rsvp
The anomalies literature is infested with widespread p-hacking.” Even Fama and French are indicted… http://theinvestmentcapm.com/Slides_Replication_2017May_OhioState.pdf / Paper: http://www.nber.org/papers/w23394 [Hou 2017]
Mark Song
@lnsongxf
@rsvp I clone the project under a directory in my PYTHONPATH,and it works, thanks for your kindly help.
Adriano
@rsvp
@lnsongxf Great! Your feedback would be much appreciated, here or in issues https://git.io/fecon235is -- enjoy.
Adriano
@rsvp
Adriano
@rsvp
Fed is preparing to gradually roll-off maturing assets on their balance sheet, currently at $4.5T -- passive QE reversal of sorts. Probably will reinvest mortgage securities though to sell off later should the housing market overheat.
AnneFacun
@annefacun
Hi!
Adriano
@rsvp
forefunds('17m', '18m') forecasts average Fed Funds rate at 1.23% one year out, implying one or two 25 bp hikes expected through June 2018.
Adriano
@rsvp
Next FOMC presser on 14 June 14:00 eastern.
Adriano
@rsvp

Quick look at equities in France since 2014, which covers Hollande malaise, Le Pen market fears, and Macron as President:

>>> fr = get('s4ewq')
 ::  Retrieved from Google Finance: EWQ
>>> fr14 = fr['2014':]
>>> roundit(gemrat(fr14))
[-0.6532, 1.6122, 19.0886, 15.7456, 256, 857]
>>> plot(fr14, 'FR_eq_2014-Macron')

plotdf-FR_eq_2014-Macron.png

The geometric mean rate is sub-zero, despite recent rally. The volatility is reasonable 19%, but the kurtosis is rather high at 15.7 (vs. 3 for a Gaussian). The function gemrat will be included in our next release.

Adriano
@rsvp
By the way, EWQ is the ETF based on French equities, and the +1.6% figure represents the arithmetic mean rate which gets penalized for leptokurtosis ("fat tails").
Adriano
@rsvp
Nice utility to strip output cells from Jupyter notebooks: https://github.com/kynan/nbstripout -- useful for compact commits in version control.
Adriano
@rsvp
New release: https://github.com/rsvp/fecon235/releases/tag/v5.17.0603 -- see esp. https://git.io/gmix where we analytically and visually show how a Gaussian Mixture model handles "fat tail" risk of leptokurtotic financial assets under small-sample conditions.
Adriano
@rsvp

It is very interesting that Berkshire Hathaway has accumulated more than 100 million shares of Apple recently, which has a geometric mean rate of 16.6% over the last ten years -- extraordinary growth:

 >>> gm2gem(get('s4aapl'))
Geometric  mean rate: 16.5693
Arithmetic mean rate: 22.4526
sigma: 32.8234
kurtosis (Pearson): 10.3151
GM(2), sigma1: 24.0206
GM(2), sigma2: 82.0585
GM(2), q:  0.0813
GM(2), b:  2.5
yearly: 256
N: 2512

and the above does not include dividend yield of 1.6%. The Gaussian mixture model deduces two volatilities: 24% and 82%, the latter occurring with probability 0.0813.

In contrast, BRK.A pays no dividends and has less a third of Apple's geometric growth (only 4.7% over the same period). It seems strange for value equities that Berkshire returns exhibit extremely high kurtosis of 21.4 (which compares to 3 for an ordinary Gaussian, and 10.3 for Apple).

Adriano
@rsvp
Highlighted by some Machine Learning for Finance and Economics fans at Facebook: https://www.facebook.com/machinelearning4financeeconomics/posts/1808618849376095 -- Thanks!
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%).