There's enough here to keep you busy for a while!
To keep it all handy, click the link below to hop to the top tweet. Then retweet it so you can keep it at the top of your timeline.
Then come back when you're ready! https://t.co/S7xFDR3tPl
https://twitter.com/pyquantnews/status/1619867548824096768Get started with Python now →
https://twitter.com/pyquantnews/status/1619870589706985472I have 1 more thing for you:
FREE 7-day masterclass that will get you up and running with Python for quant finance.
Here's what you get:
• Working code to trade with Python
• Frameworks to get you started TODAY
• Trading strategy formation framework
https://t.co/oMuWK86JhR
https://pythonforquantfinancemasterclass.comGet started with Python now →
https://twitter.com/pyquantnews/status/1619870317505134592In this thread, I showed you how to decompose a time series of US unemployment data.
Now you can:
• Improve your time series forecasts
• Inspect the trend and seasonality of a data series
• Assess the goodness of fit by inspecting the noise
There's one more thing for you!
Get started with Python now →
https://twitter.com/pyquantnews/status/1619870095127314434The results are like the additive model.
But, there are no missing values, and the seasonality component changes slowly over time. https://t.co/u9nEoOIvs3
Get started with Python now →
https://twitter.com/pyquantnews/status/1619869815904116738STL uses locally estimated scatterplot smoothing (LOESS) to extract seasonality and trend from a time series.
It improves on the basic additive model by handling any kind of seasonality and being more robust to outliers.
Run the model and plot the results. https://t.co/Fy1c92YhU7
Get started with Python now →
https://twitter.com/pyquantnews/status/1619869563042021376The additive model is basic and comes with caveats:
• The model is not robust to outliers
• There are missing data points at the beginning and end
• The model assumes there’s the same seasonal pattern every year
Time to try a more robust method. https://t.co/dOn5A9TTTe
Get started with Python now →
https://twitter.com/pyquantnews/status/1619869311673180161Run the model and plot the results.
The code extracts the trend, seasonal, and noise.
Take a look at the noise component and inspect if it looks random. If there was a strong pattern, it would tell you the time series is serially auto-correlated and the model fit is suspect. https://t.co/ph2C24QdHL
Get started with Python now →
https://twitter.com/pyquantnews/status/1619869058010161152There’s a clear downward trend in the unemployment rate.
There also appears to be some consistent spikes.
Time series decomposition should pick up these patterns. https://t.co/m3mmHO2kFe
Get started with Python now →
https://twitter.com/pyquantnews/status/1619868807358455809Then, use the OpenBB SDK to get the unemployment data.
Plot the data with a 12 month rolling mean and standard deviation to visualize the trend. https://t.co/YSbrmk6xWY
Get started with Python now →
https://twitter.com/pyquantnews/status/1619868557273096192First, import pandas for data manipulation, statsmodels for time series analysis, and the OpenBB SDK for data. https://t.co/wGEOAeoAEJ
Get started with Python now →
https://twitter.com/pyquantnews/status/1619868316050374657But first, a quick primer on time series decomposition if you’re unfamiliar:
• Lets quants analyze and forecast each part and reassemble them
• Breaks down a time series into trend, seasonality, and noise
• Models are additive or multiplicative
Let’s dive in!
Get started with Python now →
https://twitter.com/pyquantnews/status/1619868054841696256Today's reading list:
1. https://t.co/OVsyeaAObM
2. https://t.co/7j9YqrQzg8
3. https://t.co/rjv4km7MVY
4. https://t.co/E8ZJZiuI5h
5. https://t.co/5qBLTjpPdH
6. https://t.co/ioFoubBSpX https://t.co/RKvIJisYDC
https://bit.ly/3Hlj2vo
https://twitter.com/QuantSymplectic/status/1619867944879800320By reading this thread, you’ll be able to:
• Get US unemployment data for free
• Decompose the time series with an additive model
• Decompose the time series with LOESS
Here's how to do it in Python, step by step.
Get started with Python now →
https://twitter.com/pyquantnews/status/1619867797978234880The most foundational time series analysis tool:
Decomposition.
Despite advances in machine learning, quants still use it.
Unfortunately, most people forget about it.
So instead of spending two months studying it, just use it.
In a few lines of Python:
Get started with Python now →
https://twitter.com/pyquantnews/status/1619867548824096768#MLOps via Automated Pipelines using Python, SQL and standard tools
https://t.co/QxWm9ho1n8
Crypto example:
'phi wf run crypto/prices'
Terminal and Jupyter integration: https://t.co/Ns8v7FLeaW
https://www.phidata.com/New York
https://twitter.com/carlcarrie/status/1619810977528287232Oxford scientists and theologians debate AI, the emergence of algocracy, and the path of AI /Human coexistence in the NYT Sunday edition
https://t.co/MhTYdvHRhD https://t.co/1TuPoBzVw9
https://www.thetimes.co.uk/article/9d127dac-9731-11ed-ae85-8165ffa85053?shareToken=1f5ba82f303f7dc099dd0d2789f75ff5New York
https://twitter.com/carlcarrie/status/1619808757000851456Elisabetta Basilico, PhD, CFA, reviews #SustainableInvesting research in this @alphaarchitect featured article:
https://t.co/vwoyE5tbFB
#ESG https://t.co/qADFMc7nsY
https://www.tradersinsight.news/swrbConnecticut, USA
https://twitter.com/IBKR_QB/status/1619711970634088450There are 8 steps to building an algorithmic trading strategy:
1. Idea
2. Research
3. Signals
4. Assessment
5. Backtest setup
6. Backtest analysis
7. Performance analysis
8. Execution
Yesterday, 11,836 people got the guide for free.
Grab it below ↓
Get started with Python now →
https://twitter.com/pyquantnews/status/1619686372515749892Thank you to the over 1,500 people who registered to ADIA Lab's inaugural seminar, titled "Can Factor Investing Become Scientific?"
To learn more, visit:
* Slides: https://t.co/wbY0h7H55J
* Manuscript: https://t.co/5kDHBLna8i
* Paper: https://t.co/kbF0ORWw0L https://t.co/Ipz9NKMozl
https://bit.ly/3HBenXzNew York, USA
https://twitter.com/lopezdeprado/status/1619611869345648642GitHub Copilot Deconstruction
https://t.co/xwSql2AlZh
Co-Pilot Explorer - JavaScript and Python Code:
https://t.co/N7QrdiB4Gd https://t.co/acPJFv0ich
https://thakkarparth007.github.io/copilot-explorer/posts/copilot-internalsNew York
https://twitter.com/carlcarrie/status/1619536098216271873The FREE 7-day masterclass that will get you up and running with Python for quant finance.
Here's what you get:
• Working code to trade with Python
• Frameworks to get you started TODAY
• Trading strategy formation framework
7 days. Big results.
https://t.co/oMuWK86JhR
https://pythonforquantfinancemasterclass.comGet started with Python now →
https://twitter.com/pyquantnews/status/1619512046818557952This thread is packed with information.
If you can't get to it all now, click the link to hop to the top tweet.
Then retweet it (with a comment!) so you can come back to it later. https://t.co/HzD6RVhNzv
https://twitter.com/3187132960/status/1619507701028982784Get started with Python now →
https://twitter.com/pyquantnews/status/161951146919590297828Jan23 / #365APoem / And told to stop, Johnson, advice of loan,
London
https://twitter.com/saeedamenfx/status/1619511442990063616By reading the thread, you can backtest a real trading strategy with Backtrader.
Now you can get data, backtest the strategy, and analyze the results to test the performance of your strategies.
Get started with Python now →
https://twitter.com/pyquantnews/status/1619511229793304577The strategy underperforms the long-only strategy on an absolute basis.
But, it has better risk-adjusted returns, lower drawdowns, and lower volatility.
It also has a better profit factor—which is important for active strategies.
Get started with Python now →
https://twitter.com/pyquantnews/status/1619510978437070848Running this code prints 70 different performance and risk metrics. https://t.co/JuZMM5hbdo
Get started with Python now →
https://twitter.com/pyquantnews/status/1619510716116901891Trading takes time, money, and effort.
To make sure you're better off not being long TLT, compare the strategy results to a long-only strategy.
QuantStats makes it easy.
Here’s how to use it. https://t.co/NenvTCphIA
Get started with Python now →
https://twitter.com/pyquantnews/status/1619510474520887297The last step is to convert the results into a pandas DataFrame. https://t.co/YPMLuiPOMw
Get started with Python now →
https://twitter.com/pyquantnews/status/1619510225840513024Now, run the backtest.
The first step is to create a backtesting engine (Backtrader calls it Cerebro).
Then add the data, initial cash, and strategy logic. https://t.co/yWflfpm0kO
Get started with Python now →
https://twitter.com/pyquantnews/status/1619509983472762881Next, setup the BackTrader strategy.
This code tests if there’s a position in the market.
If not, it checks if the current day is within the first week of the month and creates a short position.
Otherwise, if the current day is within the last week, it creates a long position. https://t.co/B3W4bXqiqu
Get started with Python now →
https://twitter.com/pyquantnews/status/1619509715930677248Fund managers report their holdings monthly.
They don’t want to tell investors they lost money on meme stocks.
So they sell them and buy higher-quality assets, like bonds.
Can you take advantage of this?
Start with a simple helper function that gets the last day of the month. https://t.co/2UqTr6BUK9
Get started with Python now →
https://twitter.com/pyquantnews/status/1619509463148367874There’s an unsolved issue with Backtrader that prevents it from downloading data. That’s why you need the OpenBB SDK.
Here’s a simple workaround.
This function downloads the data from the OpenBB SDK, converts it to a CSV, and reads it in the Backtrader’s `YahooFinanceCSVData`. https://t.co/CPkBwStEy1
Get started with Python now →
https://twitter.com/pyquantnews/status/1619509214707073024Start by importing pandas, the OpenBB SDK, QuantStats, and Backtrader. https://t.co/twl63o8yjX
Get started with Python now →
https://twitter.com/pyquantnews/status/1619508959580246016By reading this thread, you will be able to
- Get data from OpenBB
- Build a backtest using Backtrader
- Assess the results using QuantStats
Here's how to do it in Python, step by step.
Get started with Python now →
https://twitter.com/pyquantnews/status/1619508708798599168Use the Backtrader backtest library.
Backtrader is an event-driven backtesting framework designed to remove bias.
It’s easy to build and test trading strategies in a reusable way.
But it’s hard to get started.
Fortunately, I lay it out step-by-step here.
Get started with Python now →
https://twitter.com/pyquantnews/status/1619508508625436673Here's how:
• Expect backtest results to be the same in real life
• Build their own backtesting framework
• Introduce bias into their backtest
So, how do you avoid these problems?
Get started with Python now →
https://twitter.com/pyquantnews/status/1619508272217690113But first, what’s a backtest?
A backtest:
• Tests trading ideas against historic market data
• Is used to check the robustness of trading strategies
• Is a simulation of how a strategy might have performed in the market
And most beginners get it wrong...
Get started with Python now →
https://twitter.com/pyquantnews/status/1619507953546952706Nobody taught me how to backtest a trading strategy.
So I read all the books, documentation, and blogs.
Then, I distilled what I learned into a simple step-by-step guide.
But unlike a 300-page book, this won't take you a month to read.
Here it is in 2 minutes:
Get started with Python now →
https://twitter.com/pyquantnews/status/1619507701028982784The FREE 7-day masterclass that will get you up and running with Python for quant finance.
Here's what you get:
• Working code to trade with Python
• Frameworks to get you started TODAY
• Trading strategy formation framework
7 days. Big results.
https://t.co/oMuWK86JhR
https://pythonforquantfinancemasterclass.comGet started with Python now →
https://twitter.com/pyquantnews/status/1619406393966043143Deep Generative Neural Net applied to sparse stock index portfolio optimization
Python GitHub:
https://t.co/RhzzBlZG2m https://t.co/UbRHkq3KS3
https://github.com/kayuksel/generative-optNew York
https://twitter.com/carlcarrie/status/1619402176660647936This week on the IBKR Quant Blog, find stories on importing an ipynb file, the risks in the cryptocurrency market, volatility and measures of risk-adjusted return, and more:
https://t.co/9o8WR1UsPG
#Jupyter #DataAnalytics https://t.co/BzCxMNwMMt
http://ibkrquant.comConnecticut, USA
https://twitter.com/IBKR_QB/status/1619349589663809536Some of the other skills that will help you along the way:
• Statistics
• Optimization
• Linear algebra
Get started with Python now →
https://twitter.com/pyquantnews/status/16193280047897722886/ Practice
Start by defining the outcomes you want and work backward from there. As you become more proficient, you can move on to more complex projects, such as building a trading algorithm.
Get started with Python now →
https://twitter.com/pyquantnews/status/16193277664149831685/ Get data
There are many sources of financial data available, such as Quandl, Yahoo Finance, and FRED.
The best?
The OpenBB SDK
Get started with Python now →
https://twitter.com/pyquantnews/status/1619327506145841154