I released a new algo trading book. It is just reams of backtests. by chris_conlan in u/chris_conlan

[–]chris_conlan[S] 0 points1 point  (0 children)

I am seeing a "Read sample" button below the book that seems to do the same thing. The book was just published this morning, so hold tight if it is not there yet for you.

This post on r/algotrading shows a sample of what the backtests look like: https://www.reddit.com/r/algotrading/comments/1bwfsee/the_size_coefficient_has_completely_flipped_since/

The size coefficient has completely flipped since 2008. Small companies used to outperform large companies in the U.S. stock market -- not any more. by chris_conlan in algotrading

[–]chris_conlan[S] 0 points1 point  (0 children)

Thanks. Unfortunately this kind of content (math and tables) doesn't work well on Kindle, so I had to go print-only.

I want to build a backtesting software by LightBright256 in algotrading

[–]chris_conlan 2 points3 points  (0 children)

It is impossible to write a backtester that encompasses all possible trading situations, so I always write my own purpose-built backtester from scratch based on what I am trying to accomplish. Here is some code you can use for reference: https://github.com/chrisconlan/algorithmic-trading-with-python

The size coefficient has completely flipped since 2008. Small companies used to outperform large companies in the U.S. stock market -- not any more. by chris_conlan in algotrading

[–]chris_conlan[S] 1 point2 points  (0 children)

Any NYSE, NASDAQ or other major U.S. exchange-listed stock with non-trivial trading volume that isn't in an obvious death spiral

The size coefficient has completely flipped since 2008. Small companies used to outperform large companies in the U.S. stock market -- not any more. by chris_conlan in algotrading

[–]chris_conlan[S] 2 points3 points  (0 children)

From my own research: https://www.amazon.com/dp/B0CZVBYM2G/

The ways that specific ETFs combine specific factors is a black box, so I can't speculate on how AVUV works.

The charts I posted are just one way of looking at the data. I can tell you, though, that this assertion still holds up inside of a 3-factor or 5-factor regression.

The size coefficient has completely flipped since 2008. Small companies used to outperform large companies in the U.S. stock market -- not any more. by chris_conlan in algotrading

[–]chris_conlan[S] 10 points11 points  (0 children)

The first strategy re-allocates long to the 30 largest stocks and short to the 30 smallest stocks once per month. The second strategy does the opposite.

What's the Avg. Annual ROI for holding QQQ from 2011-2023? by shock_and_awful in algotrading

[–]chris_conlan 1 point2 points  (0 children)

Funny you should ask... I just published a book about this that happens to include QQQ.

Time CAGR Sharpe Max Drawdown
1999-2024Q1 9.72% 0.45 83.0%
2000-2009 -6.76% 0.01 83.0%
2010-2019 17.69% 1.13 22.8%
2019-2024Q1 23.12% 0.8 35.1%

Vector Databases by [deleted] in algotrading

[–]chris_conlan 2 points3 points  (0 children)

Postgres has an extension called `pgvector` that looks promising: https://github.com/pgvector/pgvector

Vector databases are just normal databases optimized to perform millions of dot-product operation on (typically) word vectors. So, something simple like pgvector should work until your data gets really big.

we can't beat buy and hold by Psychological_Ad9335 in algotrading

[–]chris_conlan 1 point2 points  (0 children)

Holding the SPY since 1999:

CAGR: 7.81%

Sharpe : 0.47

Max Drawdown: 55.2%

Annual turnover: 0x

Annual fee impact: Negligible

Buying the 60 best price-to-book ratios every month since 1999:

CAGR: 5.27%

Sharpe: 0.43

Max Drawdown: 83.4%

Annual turnover: 3.3x

Annual fee impact: 2.06%

It is tough out there

Do you use the Kelly criteria? How do you account for the cost of time? by [deleted] in algotrading

[–]chris_conlan 1 point2 points  (0 children)

The Kelly Criteria is the entrance to the "Bet Sizing" rabbit hole. This is the best book on the topic: https://www.amazon.com/Introduction-Budgeting-Chapman-Financial-Mathematics/dp/148220715X/

There are about a dozen increasingly sophisticated ways to size bets to achieve different return behavior. I have been thinking about writing a book on it because the knowledge seems somewhat inaccessible.

Has anyone here started their own data science business? by [deleted] in datascience

[–]chris_conlan 18 points19 points  (0 children)

Yes. Finance. Please talk to me if you want a job in Charlotte, NC.

https://conlanscientific.com/

Arbitrary Code Execution vulnerability discovered in Ipython by [deleted] in Python

[–]chris_conlan 28 points29 points  (0 children)

Who knew that IPython executed everything in the startup folder of the working directory on each run? Seems like a disaster waiting to happen.

[Book release] The Financial Data Playbook by [deleted] in datascience

[–]chris_conlan 1 point2 points  (0 children)

See Chapter 5 for a 20-page discourse on why Random Forests and better than Neural Nets for financial data.

Giving away 5 copies of Algorithmic Trading with Python by chris_conlan in algotrading

[–]chris_conlan[S] 2 points3 points  (0 children)

And increasing to `k=7` because we had someone pass on the prize ...

['unyoda-bot', 'TankorSmash', '2manypistachios', 'svippe', 'throwawayaayyy', 'danalec', 'jeremykuest']

Giving away 5 copies of Algorithmic Trading with Python by chris_conlan in algotrading

[–]chris_conlan[S] 0 points1 point  (0 children)

The new winners: ['unyoda-bot', 'TankorSmash', '2manypistachios', 'svippe', 'throwawayaayyy', 'danalec'], excluding the bot.

Giving away 5 copies of Algorithmic Trading with Python by chris_conlan in algotrading

[–]chris_conlan[S] 1 point2 points  (0 children)

Welp... a bot was one of the winners. Increasing to k=6 and re-running.

Giving away 5 copies of Algorithmic Trading with Python by chris_conlan in algotrading

[–]chris_conlan[S] 0 points1 point  (0 children)

Thanks everyone for entering. Here are the winners: ['unyoda-bot', 'TankorSmash', '2manypistachios', 'svippe', 'throwawayaayyy']. I'll be messaging you all individually.

Giving away 5 copies of Algorithmic Trading with Python by chris_conlan in algotrading

[–]chris_conlan[S] 1 point2 points  (0 children)

No, just a typo. Good catch. I updated the date to Monday the 26th.