Discover and read the best of Twitter Threads about #RPubs

Most recents (2)

@WifeyAlpha recently posted a thread with 16 buy-and-hold asset allocation schemes, i.e. fixed-weight portfolios that can be implemented with ETFs. I decided to write some code to test these in #R #RStats. The code is available on #RPubs:
rpubs.com/arubesam/stati…
The code is a quick & dirty calculation using monthly returns with monthly rebal. It does not take into account transaction costs. The code can be easily adapted to test other asset allocation schemes.
I use the following #R packages: quantmod to get prices from Yahoo; PerformanceAnalytics for calculation of performance metrics. All backtests start when data for all necessary tickers becomes available.
Read 18 tweets
I recently implemented some pairs trading strategies for a paper, and decided to share an implementation of the Gatev, Goetzmann & Rouwenhorst (2006) strategy on a short article on RPubs.
rpubs.com/arubesam/Repli…
#rstats #RPubs #DataScience #finance #pairstrading #reproducibility
In the RPubs post above, I provide the #R code to backtest the strategy, as well as some results replicating Gatev, Goetzmann & Rouwenhorst (2006) and Do and Faff (2010), and extending the sample to the end of 2020. In this thread, I show some of these results.
Pairs trading is a type of systematic trading strategy based on finding pairs of stocks or assets that have historically "moved together", and betting that divergences will eventually get corrected. It is a simple form of statistical arbitrage.
Read 23 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!