Quant Mashup Trading China A-Share Stocks Based On Social Media Data Analysis In Python [Quant Insti]In this article, we will understand how natural language processing, sentiment analysis and social media play a role in the share markets with the help of Python. This would be explained with respect to the trading in China markets A-share stocks. This article is the final project submitted by the(...) A Matter of Scale [Quant Dare]When dealing with mathematical modeling, choosing the right scale to frame the equations can make the difference between a successful and lasting model, or poor description of reality. In today’s post, we explore two important scaling procedures that arise in finance: the annualisation of returns(...) DeepTrading with TensorFlow III [Todo Trader]We are now closer to applying our knowledge of neural networks (NN) to our trading systems. But, we still have to tune our rudiments a bit on TensorFlow. If you are not yet familiar with our supervised machine learning flowchart, take a look at the first two posts in this series. DeepTrading with(...) A Python Implementation of Triangles for Visualising Long-Term Investment Metrics [Scalable Capital]We introduce triangle plots for visualising long-term investment metrics. Return triangles are well suited to showcase the performance of a strategy or asset for a huge number of possible subperiods. Sensitivity analysis with respect to the length of the holding period as well as the start and end(...) Shannon Entropy: A Genius Gambler's Guide to Market Randomness [Robot Wealth]Before you commit your precious time to read this blog post, I need to warn you that this is one of those posts that market nerds like myself will get a kick out of, but which probably won’t add much of practical value to your trading. The purpose of this post is to scratch the surface of the(...) Factor Investing Research On Steriods [Alpha Architect]What are the research questions? Do the most prominent long/short factors — value, momentum, carry, and defensive — survive out of sample? Can long/short factors be timed? What are the Academic Insights? YES. All of the factors exist out of sample, albeit their magnitudes are generally muted.(1)(...) Time-Series Signals and Multi-Sector Bonds [Flirting with Models]We expand last week’s commentary to explore momentum, carry, value, and long-term reversal signals in a time-series context. Using these signals, we generate long/short portfolios for each asset class. We use a sub-sampling methodology to bootstrap and annualized return distribution. We find that(...) A Horse Race of Liquid Alternatives [Factor Research]Investors can access alternative strategies via mutual funds and ETFs Most of these show moderate to high correlations to equities, which is concerning Bonds would have been a better diversifier in recent years INTRODUCTION Investing is challenging as it is complex and complicated, which requires(...) Natural language processing for financial markets [SR SV]News and comments are major drivers for asset prices, maybe more so than conventional price and economic data. Yet it is impossible for any financial professional to read and analyse the vast and growing flow of written information. This is becoming the domain of natural language processing; a(...) Market Timing with a Canary, Gold, Copper, LQD, IEF and much more [Alvarez Quant Trading]One commonality in my strategies is the inclusion of a market timing component. This could be a signal to go into cash or reduce position size or enter a ‘safe’ ETF. This applies to my swing trading strategies, my monthly rotation strategies and my Tactical Assert Allocation strategies. As a(...) The Threat of Rising Rates and the Impact on TAA vs B&H Investing [Allocate Smartly]We’ve written a lot here and on our sister site BetterBuyAndHold.com about the threat of rising interest rates. You can read some of our past work projecting returns for Treasury ETFs and other interest rate sensitive assets here and here. In a nutshell, assuming that we’re near the tail end of(...) Value Factor Valuations Over Time: US and Developed [Alpha Architect]We built a simple tool recently to review so-called value spreads over time. (1) This tool maps out the median valuations for the top decile and bottom decile “cheap stock” portfolios (as measured by EBIT/TEV). Why might this be useful? This tool allows one to identify the “valuation” spread(...) The Cross-Section of Emerging Market Stock Returns [Alpha Architect]As a non-academic finance person, I was never really exposed to academic research until I started working on articles for Alpha Architect. Fortunately (or unfortunately, depending on your perspective), I am now very familiar with the so-called “cross-section of expected returns” debates.(...) Portfolio construction tilting towards higher moments [Eran Raviv]When you build your portfolio you must decide what is your risk profile. A pension fund’s risk profile is different than that of a hedge fund, which is different than that of a family office. Everyone’s goal is to maximize returns given the risk. Sinfully but commonly risk is defined as the(...) Quantitative Styles and Multi-Sector Bonds [Flirting with Models]In this commentary we explore the application of several quantitative signals to a broad set of fixed income exposures. Specifically, we explore value, momentum, carry, long-term reversals, and volatility signals. We find that value, 3-month momentum, carry, and 3-year reversals all create(...) Strategy Risk vs Asset Risk [Two Centuries Investments]Alternative Title: How to Avoid Bad Manager Timing Let’s look at the two types of risks in most investments: Strategy Risk: If you own a black-box ‘go-anywhere’ hedge fund that invests long and short and uses futures and derivatives at any frequencies, you are mostly exposed to the strategy(...) The Case Against Small Caps [Factor Research]The performance of the Size factor in the US was positive since 1926, but not particularly attractive Returns in Europe were more favorable, but not in Japan Alternative metrics to market capitalization would not have resulted in better performance SMALL VERSUS LARGE STOCKS In the David vs. Goliath(...) State of Trend Following in May [Au Tra Sy]Strong result in May for the Trend Following index, taking the Year-to-Date performance in positive territory. Please check below for more details. Detailed Results The figures for the month are: May return: 5.01% YTD return: 2.94% Below is the chart displaying individual system results throughout(...) Future-Proofing Quant Conference from QuantMinds, September 9 - 11 in BostonJoin experts from banks, buy-side, Silicon Valley and academia to meet, network and share ideas at America's leading quant finance event. 3 key themes shaping the agenda: 1. Innovations in machine learning, HFT, AI and data 2. Quant techniques in investment and trading 3. Advances in option(...) Selection of Sparse Mean-reverting Portfolios - Part 1 [Alex Botsula]Mean-reverting portfolio construction is an exciting area that involves a wide range of forecasting and optimisation techniques. In Part 1 of the setries, I demonstrate the approach to the construction of optimal mean reverting portfolios satisfying sparsity and volatility constraints. A theory of hedge fund runs [SR SV]Hedge funds’ capital structure is vulnerable to market shocks because most of them offer high liquidity to loss-sensitive investors. Moreover, hedge fund managers form expectations about each other based on market prices and investor flows. When industry-wide position liquidations become a(...) Frank Fabozzi blasts the state of academic economics and finance [Mathematical Investor]In an interview published at the Enterprising Investor blog, Frank Fabozzi, a well-known researcher and author in the mathematical finance field, has sharply criticized the current state of academic economics and finance. Here are some highlights: The “rational models” constructed in economics(...) Determining the Noise Covariance Matrix R for a Kalman Filter [Dekalog Blog]An important part of getting a Kalman filter to work well is tuning the process noise covariance matrix Q and the measurement noise covariance matrix R. This post is about obtaining the R matrix, with a post about the Q matrix to come in due course. In my last post about the alternative version(...) The Re-Death of Value, or Déjà Vu All Over? [Alpha Architect]The underperformance of value stocks over the past 10 years has received much attention from the financial media and led at least some investors to conclude that value investing is dead. From 2009 through March 2019, while the S&P 500 Index returned 14.2 percent per annum (total cumulative(...) Tactical Asset Allocation in May [Allocate Smartly]This is a summary of the recent performance of a wide range of excellent Tactical Asset Allocation (TAA) strategies, net of transaction costs. These strategies are sourced from books, academic papers, and other publications. While we don’t (yet) include every published TAA model, these strategies(...) Tactical Credit [Flirting with Models]In this commentary we explore tactical credit strategies that switch between high yield bonds and core fixed income exposures. We find that short-term momentum signals generate statistically significant annualized excess returns. We use a cross-section of statistically significant strategy(...) Quantamental Investing - A Century of Inventions [Two Centuries Investments]Last week’s talk by Edward Altman at the 50-year anniversary of Altman’s Z-score event at the CFA New York inspired me to compile an expanded list of memorable inventions in equity analysis. Each one is a successful blend of quantitative and fundamental thinking - which is increasingly being(...) How to Allocate Smartly to Smart Beta [Factor Research]This research note was originally published in the Beyond Beta magazine from ETF Stream. Here is the link. SUMMARY Single factor excess returns are attractive over the long-term, less in the short-term Comparing popular asset allocation models does not highlight one superior methodology Multi-factor(...) Is factor momentum really everywhere? [Alpha Architect]The research presented here covers the largest number of factors (65) tested in the academic literature. The most robust and well-cited factors appear in the list of data items, available since the 1960s. A notable exclusion is the IBES dataset, which is available only in the 1980s. Is there(...) Optimising MetaTrader for Algorithmic Trading [Robot Wealth]If you’ve ever delved into the world of retail foreign exchange trading, you’ll have come across the MetaTrader platform. Let’s be clear. The platform has its drawbacks. If you’ve traded “grown-up” markets, some of the features will leave you scratching your head. But one thing’s for(...) Downloading option chain and fundamental from Yahoo! Finance with Python [Ran Aroussi]The recently updated yfinance added a lot more capabilities to this already popular library. You can now download fundamental data, including company financials, balance sheet and cashflow, as well as option chain data. Here's how... First, import yfinance and create a ticker object: 1 2 import(...) Extended Kalman Filter, Alternative Version [Dekalog Blog]Below is alternative code for an Extended Kalman filter for a sine wave, which has 4 states: the sine wave value, the phase, the angular frequency and amplitude and measurements thereof. I have found it necessary to implement this version because I couldn't adjust my earlier version code to(...) Python Monte Carlo vs Bootstrapping [Python For Finance]In this article I thought I would take a look at and compare the concepts of “Monte Carlo analysis” and “Bootstrapping” in relation to simulating returns series and generating corresponding confidence intervals as to a portfolio’s potential risks and rewards. Both methods are used to(...) Skewness Effect in Commodities [Alpha Architect]Nothing lasts forever and this definitely stands true for equity markets where volatility can explode and investors can lose a lot of money very quickly. Because of equity market volatility investors often seek so-called “crisis alpha” instruments, or assets that tend to go up when equity(...) Trade Cost Optimisation II: Tracking Error and the Cutting Plane Algorithm [Scalable Capital]This blog article builds on our first blog article about trade cost optimisation approaches. We discuss some weaknesses of the simple approach presented in the first article and make suggestions for extending and improving the trade cost optimisation towards a more sophisticated and powerful(...) Our Systematic Value Philosophy [Flirting with Models]As a firm, Newfound Research focuses on tactical allocation strategies. However, we also spend time researching other mandates – such as systematic value – in an effort to introduce lateral thinking to our process. Three years ago, we built a systematic value portfolio that seeks to create a(...) News Sentiment and Bonds [Alpha Architect]Academic literature has documented a news sentiment effect on equities ( here and here ). The authors investigate the following research question: Does the sentiment derived from media content impact bond market investors? What are the Academic Insights? By studying the sentiment extracted from(...) A Song of Value and Growth [Quiet Quant]Despite Uncle Warren’s understanding of the connection of growth and value, those of us that come to investing through the factor and/or academic world, have always been taught that growth investing is a terrible way to invest. This is simply because we have, in most cases, been taught that growth(...) Random Portfolio Generator - Are you Good or Lucky? [Rayner Gobran]I am not a fan of benchmarking against widely available indexes. Most anyone you ask will tell you that you should benchmark against an index because it is an objective measure of performance. It provides you with the “beta” that allows you to figure out if an investment manager delivers(...) Volatility vs Risk [Two Centuries Investments]Much has been written on this topic, but for what it’s worth, here is my take. Volatility is how much something moves up and down. The stock market is more volatile than the bond market, on average. Yet, a black-box hedge fund might be less volatile than S&P500, but is it less risky? Risk =(...) Cheap versus Expensive Countries [Factor Research]A global value portfolio on country level features structural country biases Returns were positive since 1990, but lacked consistency Value on country and single stock level exhibit the same trends, highlighting common performance drivers INTRODUCTION Holding Value stocks is emotionally challenging(...) Extended Kalman Filter [Dekalog Blog]In the code box below I provide code for an Extended Kalman filter to model a sine wave. This is a mashup of code from a couple of toolboxes I have found online, namely learning-the-extended-kalman-filter and EKF/UKF Tollbox for Matlab/Octave. The modelled states are the phase, angular frequency and(...) An Updated Look At Memorial Week Historical $SPX Performance [Quantifiable Edges]The week of Memorial Day has shown some interesting seasonal tendencies over the years. But it has been less consistent recently. The chart below is one I have shown in the past, and have now updated. It examines SPX performance from the Friday before Memorial Day to the Friday after it. 2019-05-24(...) Alternatives To Correlation For Quantifying Diversification [Capital Spectator]Diversification is famously described as the only free lunch in investing and so it’s no surprise that modeling, analyzing and otherwise dissecting the concept is a core part of portfolio design and management. The correlation coefficient is often the go-to metric in this corner of finance. But(...) Risk-Factor Identification: A Critique [Alex Chinco]In standard cross-sectional asset-pricing models, expected returns are governed by exposure to aggregate risk factors in a market populated by fully rational investors. Here’s how these models work. Because investors are fully rational, they correctly anticipate which assets are most likely to(...) U.S. Treasuries: decomposing the yield curve and predicting returns [SR SV]A new paper proposes to decompose the U.S. government bond yield curve by applying a ‘bootstrapping method’ that resamples observed return differences across maturities. The advantage of this method over the classical principal components approach would be greater robustness to misspecification(...) Quantopian Review and Comparison to AmiBroker [Alvarez Quant Trading]In my last post, Avoiding Trades Before Earnings, I mentioned that I used Quantopian to do the research. Several readers asked about my thoughts about Quantopian and how it compares to AmiBroker. Some asked if I had left AmiBroker for Quantopian. What follows are my impressions after using(...) Volatility Targeting Improves Risk-Adjusted Returns [Alpha Architect]There’s a large body of research, including the 2017 study “Tail Risk Mitigation with Managed Volatility Strategies” by Anna Dreyer and Stefan Hubrich, that demonstrates that, while past returns do not predict future returns, past volatility largely predicts future near-term(...) Technical analysis in major brokerages and financial media [Mathematical Investor]Suppose, in the weather forecast part of a local newscast, the person handling the weather displays a chart of recent temperatures in the local area, pointed out “trends” and “waves,” then mentions a “breakout pattern” from a recent temperature range. Most of us would not have much(...) Volatility Anomalies: IVOL and Vol-of-Vol [Alpha Architect]Two of the more interesting puzzles in finance are related to volatility—stocks with greater idiosyncratic volatility (IVOL) have produced lower returns and stocks with high uncertainty about risk, as measured by the volatility of expected volatility (vol-of-vol), underperform stocks with low(...)