Attention Intensity as Contrarian Factor Tilt
I am glad to annouce we have hit 2.5k readers! I have my fingers crossed for 5k by end of year :) We have decided to make available this week’s paper for all readers. The code appended is for paid subscribers.
We look at working with Google’s interest over time data, and construct some interesting signals. We also discuss important methods to deconstruct strategy exposure to classical factors, such as the Fama French approach. In the series of recent posts, such as the one below:
we have focused on training the reader’s analytical mind, and to recognise biases in how performance results can be introduced in available literature. This trains us to be more mindful of the consumption of financial literature. Additionally, such biases can easily creep into our quantitative approach and systematic construction in our personal portfolios. My hope is that readers apply the techniques learnt to their personal trading systems and question the validity of their own work, which can be a crucial, preventive wealth-saving exercise for your future. I hope that such works can also adjust expectations towards the reality of alpha research for the general public. One of our core goals is to bridge the gap in quantitative research between retail and institutional establishments, and a big part of that is in the delusional optimisim in which amateur traders view the attainment of persistent alphas.
On top of the previous features, our Russian Doll engine now supports computation and visualization of:
cumulative returns, log returns
maximum drawdown, rolling drawdown, rolling max drawdown
sortino, sharpe
mean, stdev, variance, skew, kurtosis of returns
cagr, rolling cagr, omega, calmar ratios
ulcer index
value at risk, expected shortfall
gain to pain ratios
weight bias
return density plots
one factor capm model with spx
one factor capm model with strategy constituents
fama french model with strategy constituents (daily resolution)
jensen’s alpha, treynor ratio
stochastic dominance of strategy
Due to significant volume in code additions, we decided to release a more comprehensive set of code files in the cbz folder attached. You can find:
aiohttp_wrapper.py: asynchronous sessioned request manager
alpha.py: Russian Doll implementation for backtester
data_master.py: control file for data services
eod_wrapper.py: implements eodhistoricaldata functionalities
equities.py: retrieves factor data and pricing data for equities
generic_wrapper.py: interacts with database and batches data requests
indices.py: retrieves pricing data for indices
performance.py: calculator for strategy performance measures and statistics
quant_stats.py: utility files for permutation testing, hypothesis testing and more
serp.py: interacts with SERP API to retrieve Google Data
strat.py: implementation of strategy and signal for paper discussed
yfinance_wrapper.py: implements threaded model for retrieving pricing data from Yahoo! Finance
CBZ folder of code files, paid readers: