Showing posts with label Portfolio. Show all posts
Showing posts with label Portfolio. Show all posts

Friday, January 16, 2026

Jan 12th - The Death Spiral - Trading Lessons Learned

I learned quickly all of the issues with Algo Trading.

Lesson 1 - 4-to-1 Margins Were Enabled

I didn't take the time to look at the Configuration. So I was trading on Margin, and had to Liquidate a bunch of positions, some of which lost money.

Lesson 2 - Stop Limits Can Lead to a HOST of Problems

I had stop limit orders being set up to protect my downside. But, this led to THIS problem:

Buy HMY @ $25 → gap to $23 → stop → rebuy $23.50 
→ gap to $21 → stop → rebuy $21.80 → PDT flag → can't exit → $18

Basically, the stop limits were causing repetitive buying in falling-knife scenarios, because the model would pick the same symbol the next trade.

Lesson 3 - Some Symbols Are Halted or Delisted

I had one position, CLCO, which was halted. I have tried to force liquidate this position, but it is absolutely stuck. I will probably have to contact support. But this has thrown a major wrench into my Portfolio Manager, which needs to know that this money is "locked up" and account for that.

I also had issues with the model itself - in that the way the algorithm was working, it would pick the best ranked stocks, even if the signal strength or momentum was negative. So this had to be fixed as well, with some enhanced signal strength and momentum logic.

So - very expensive lessons. The back-testing of the model is turning out fine. But the Porfolio Manager and its transaction management was killing us. We burned about $10K of our $100K on this. Hopefully it starts to work better now with fixes to these issues.

Friday, January 2, 2026

The Algo Trading Model is Live!

I am now using a Paper Trading account using Alpaca!

The paper trading account seeds you with $100K of money. This is a bit similar to the Investopedia Simulator, except that you can work with this account programmatically through APIs. It looks like a lot of day traders (options, derivatives, et al) use this. But I am using it just to buy and sell stocks.

Their user interface is a bit confusing, but with the help of some Python, I am able to get the status information I need. For example, the Positions tab doesn't carry much information. You have to actually consult the Orders tab, and marry things together to get a fuller view.

I needed a Portfolio Manager to make decisions on trading. I was going to use an Agentic AI approach using Langchain, or maybe Crew or MCP. Something along that vein.  But the AIs themselves, pointed out that these are too quirky and "black box" to be able to rely on them in a real trading situation. They suggested I go with a Deterministic approach.

So - with the help of an LLM that is trained on more technical topics, I had it generate me a few drafts until I saw something that looked simple enough to get started with.  It simply takes the predictions csv, and uses that as input for its trading. It will buy positions, hold them for 5 days, and sell them. Simple enough.

 

It Does Seem that AI LLMs Have "Bad Days"

My coding assistant seems to have been having a very very bad day. Not sure why, and I have never seen this behavior before. But this is why...