• AI in the markets

    AI trading

    The invention of the ship was also the invention of the shipwreck. – Paul Virilio

    Somebody vibecoded a bot to identify Bitcoin wallets that had successful trading strategies and copycat them.

    Possibly fictional viral content, but it raises interesting questions of market design.

    Automated strategies are already entrenched in financial markets. AI adds new dimensions: more people can create automated strategies, and strategies can access all the world’s structured and unstructured data. What are the implications for price discovery and market function?

    Grossman-Stiglitz says markets can only be boundedly efficient if information and trading aren’t free. Analysts research and identify mispricings, and as they trade, markets get more efficient. Eventually prices get efficient enough that it doesn’t pay to do research and trade. The process of making markets efficient costs money, which requires markets to be inefficient enough to pay for it.

    But if you have AI that can cheaply process all the information in the world like an analyst, markets can get pretty efficient.

    It’s already hard being an analyst or a human trader, sell-side research and human traders have been decimated. It’s might get even harder as they compete with bots that can process all the world’s data and execute trades faster than any human. A robot equity research report writer is pretty good and so easy, to build I even vibe-coded my own.

    In Bitcoin you can see near-real-time trades, so you can copycat anyone. I guess traders could create new wallets and try to obfuscate trades. But if people are transferring between wallets you can probably analyze networks and figure out which wallets are related. But then maybe all the edge traders could form a bank to hide behind. Then they have to trust each other to share wallets.

    Copycats happen. Index trading, or VWAP trading mirroring orders in the level 2 order book, or even trend following, are all copycat strategies. In the US, Reg 13F requires big institutional holders to disclose positions quarterly which anyone could copy. It lets the companies know their owners, lets investors in funds analyze their fund managers. But we don’t require stock traders to disclose trades in real time like an active ETF. Certainly that would reduce the edge of anyone who was a good analyst, if people could copy their trades almost immediately instead of quarterly. Alpha decay is real.

    When you design the market and what info is disclosed, you want enough disclosure so people can understand the process and verify it’s fair, or at least study how rigged it is. On the other hand if everyone had to disclose everything in real time, you get fast information diffusion, but fast alpha decay and some edges no longer make sense to trade on.

    There is probably a bell curve where some disclosure makes markets more efficient, but too much disclosure might drive smart traders out, and paradoxically make markets less efficient and more herdy. For any given policy on market structure and disclosure, it is challenging to predict all the first- and higher-order effects.

    Somewhat unrelated, there are some weirdos who think there shouldn’t be regs at all, and insider trading should be legal. But that leads to an Akerlof market for lemons, people don’t trade if they don’t trust the markets. Do you want to trade against insiders like soldiers betting on the war in Iran, or politicians betting on their own campaigns?

    Kalshi and Polymarket are banning insider bets right and left these days. Who wants to bet on the NBA or boxing if point-shaving and throwing fights are legal? Again, there is a bell curve. A public market is a human institution created to solve the problems of saving and capital formation. To exist and function it needs rules to balance transparency, fairness, efficiency, freedom, adaptability, and trust. And again, too few rules and it doesn’t work, too many and it raises costs, people flee to private markets.

    Also, there are players like Bloomberg and Google who have everyone’s activity and emails, if they could just trade on it, the equilibrium is one giant Big Tech company that has all the information and sets all the prices, i.e. central planning, and people not being able to say anything because everything is bugged, like under the Stasi.

    At one time, Excel and Bloomberg allowed hundreds of small hedge funds to start up and compete effectively with giants. It’s possible that vibecoded, democratized data will let new players flower. But AI and big data are not that easy to democratize, and might make the rich even richer. On the whole, I would expect more concentration and bifurcation between the quant firms and the rest.

    And there is a lot of room for AI- and tech-related bubbles and disasters, from flash crashes through trading strategies running amok, to small choke points like electrical substations and routers in Herndon knocking out much of the tech world.

    George Devol drew Canada Bill aside and asked him if he couldn’t see that the game was crooked. And Canada Bill sighed, and shrugged his shoulders, and said, ‘I know. But it’s the only game in town.’ And he went back to the game.

  • Speedrunning the Claude Code learning curve

    Claude Code, Anthropic’s agentic coding command-line interface (CLI) tool, has been a growing phenomenon.

    What we will cover:

    • A quick start for those who haven’t tried it
    • Best practices and how to climb the ladder to being a Claude Code AI coding expert
    Claude Code
  • Asset Allocation for Midwits: Everything You Always Wanted to Know About Portfolio Optimization But Were Afraid to Ask

    You don’t need to be a rocket scientist. Investing is not a game where the guy with the 160 IQ beats the guy with 130 IQ. Success in investing doesn’t correlate with IQ once you’re above the level of 120. What you need is the temperament to control the urges that get other people into trouble in investing. If your IQ is 150, sell 30 points; it won’t hurt. - Warren Buffett

    Efficient frontier using US asset classes, 1928-2025
    Efficient Frontier using US Asset classes, 1928-2025
  • Mysterious ways

    The smartest thing anyone ever told me about their religion was “I don’t actually believe any of that stuff, I just like going to church.”

  • An AI Maturity Framework

    A 12-dimension assessment of your company’s AI maturity and readiness, and a roadmap for developing an AI strategy

    Spider chart
    A 12-dimension, 200+ question AI maturity model.
  • Claude Code, Claude Skills and the Vibe Coding Revolution

    Another Simon Willison post has motivated me to go down a rabbit hole.

    Vibecoding, by Andrej Karpathy.
    Image credit: via Andrej Karpathy
  • Bad Vibes: High Variance v. High Bias

    “He was very unsettled and he very deeply believed that vaccines hurt him and were hurting other people.”

    RFK, Jr. promises to ‘clean up cesspool of corruption at CDC’.

    “In such a world of conflict, a world of victims and executioners, it is the job of thinking people, not to be on the side of the executioners.”- Albert Camus

  • Urban Myths of AI

    This is a rant about cybersecurity and the information space around AI.

  • 16 Agent Patterns: An Agent Engineering Primer

    Agent engineering illustration

    Any sufficiently advanced technology is indistinguishable from magic. — Arthur C. Clarke

    What are AI agents? Simon Willison crowdsourced a lot of definitions that focus on:

    1) Using AI to take action on the user’s behalf in the real world (i.e. what the agent does)
    2) Using AI to control a loop or complex flow (i.e. how the agent does it).

    An AI agent takes a sequence of actions based on an AI-determined control flow.

    Agents use prompts as the CPU of a Turing machine that can manage state, memory, I/O, and control flow. The agent can access the Internet and tools to perform compute tasks, retrieve info, take actions via APIs, and use the outputs to determine next steps in a loop or complex control flow. Maybe even control a browser or computer.

    In this post, we’ll try to develop a roadmap of agent concepts and patterns to learn, and resources to learn them.

  • The AI Economic Singularity is Near

    Robot barista declines job application from human

    Economics is the painful elaboration of the obvious.

    Pundits sometimes say things like “AI is going to make our workers more productive, and they will reap the rewards with higher wages.”

    It’s mostly worked out the way in the past. But the labor share of income has varied. How much labor benefits, and how much capital benefits, depends on how technology complements labor, versus substitutes for it. There is little support in economic theory for the notion that technological progress always raises everyone’s wages and standard of living. It’s empirically been significantly true in the past. But the notion that it’s an iron rule is just pop economics, a Panglossian belief based on motivated thinking.

    AI is the most human-like technology ever invented, so it seems likely to be an effective substitute for human labor. It seems likely that we will get growth but also disruption, more income inequality, more concentration of wealth, and more people locked out of decent middle class and working class jobs. The worst case would be an ‘economic singularity’ of robots making more robots while masses are immiserated. We should think about how to detect the singularity and use policy to head it off.

    Let’s break it down (painful as it may be).

  • The State of AI in 2025

    Simon Willison has a great post on everything we learned about AI in 2024 (somewhat technical). Inspired by him, here is a roundup of the top events of 2024 in AI and where we are now.

    AI generated cat welcoming 2025.
  • There Are Levels To This Game: The 5 Stages of AI Adoption

    Expanding Brain Meme of the 5 Levels of AI Adoption.
    Expanding Brain Meme of the 5 Levels of AI Adoption.
  • AI Disasters and How to Avoid Them, and Use Tools Like ChatGPT Effectively Without Risking Your Reputation and Career

    Artist Bob Ross smiling in front of a terrible painting of Beast Jesus.
    "I would have been the greatest artist ever,
    if I could just remember how many fingers humans have."
  • How To Build a Financial Market Data Chatbot with OpenBB and LangChain: A Step-by-Step Guide (Including Video and Code)

    A video and blog post about building a chat agent for conversational queries to an API like OpenBB.

    • OpenBB is a platform offering a unified API to access market data services.
    • LangChain is a framework that supports many LLM application patterns, including chatbot agents.
    • Streamlit is a simple way to build a Python chat UI.
    • We build a functional chatbot capable of answering stock market-related queries using tools.
  • Summarize a complete book using the giant context window in Gemini 1.5

    A short (< 10-minute) demo video, with a couple of intro comments about early 2024 LLM developments