• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Let's build an Agentic Trading System. Together

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,483
Баллы
155
My role?
Basically building mathematical models to estimate market risk for all financial derivatives at one of the largest European banks.

Was it fun?
Yes, of course! It was my dream job back then (the fact that it was the first job out of Maths school probably helped).

I used to spend my days fitting statistical models to price and hedge financial derivatives, way before Machine Learning was cool.

It was all about MATLAB (not my cup of tea, but my best friend at the time. Is that too sad? xD).

Apart from maths and MATLAB, a big part of my job was talking to traders, the guys at the bank that were using these models to make trading decisions that fit their (and the bank's) risk appetite.

Then something happened
I entered a trading floor for the first time in my life, and I got a glimpse of what actual trading looks like.

Bloomberg terminals, fax machines, phone booths.

Risk management, portfolio construction, and of course trading.

One of the things that caught my attention, was the amount of screens showing Bloomberg news 24/7.

Traders would constantly have one eye on their Bloomberg terminal, and the other on Bloomberg news.

Why?
Because they knew that some news can really move the market.

So they wanted to be the first to know, take action and profit.

Back then there was no such thing as Large Language Models. But there were a lot of smart tricks to extract sentiment from news.

Simple regular expressions, helped quant traders build C++ functions running on Bloomberg terminals, generating numeric scores for potential market moves.

These inputs were then used to make trading decisions (by traders), that had to be approved by risk management.

That was the Prehistory of Natural Language Processing.

Fast forward 13 years….

Sentiment analysis is a solved problem in 2025
Large Language Models are universal functions that can map any given text to any structured output you want.

For example, map a piece of market news to a JSON formatted list of sentiment scores.

Of course, you need to wrestle a bit with your prompts to get there.

And this is something I want to quickly show you if you have 5 minutes. Do you?

A 5-minutes straight-to-the-point prompt engineering example
All the source code I am showing you here is in this repo I put together.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

We will be using [

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

](

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

) (Basically a Made up Language) to ensure our LLM generates the type of structured output we want.

Why BAML?

I personally prefer BAML to all-in-one frameworks like LangChain, as it makes fast prompt experimentation (the key to success for 99% of LLM problems) easier.

I also strongly recommend you use

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

to package your project.

curl -LsSf

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

| sh
For example, to create the project structure you just need to run:

uv init crypto-sentiment-parser
Nice, let's now install the BAML client and the BAML cli.

uv add baml-py
To generate some boilerplate BAML code under baml_src run:

uv run baml-cli init
From these *.baml typed files, you can generate the equivalent Python code with:

uv run baml-cli generate
And here is where the magic starts to happen → In the BAML language a prompt is a function with strict types.

You define your types in BAML

class CryptoSentiment {
coin Coin
score Score
reason string
}

enum Coin {
Bitcoin
Ethereum
}

enum Score {
Positive @description("Positive sentiment")
Negative @description("Negative sentiment")
Neutral @description("Neutral sentiment")
}
and from there, you prompt becomes a typed function. Genius.

For example, here is our ExtractCryptoSentiment function, that maps a string to a list of CryptoSentiment objects.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



From here, the BAML client will generate the Python code for you and put it in the baml_client folder.

So, whenever you need to invoke this very simple sentiment extraction agent, you just need to use a super simple function like this:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



If you want to play around, check out

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

I put together. Feel free to adjust the code to your own needs.

So what now?
Building a sentiment extraction parser like we just did is very cool and all that.
But this is just one piece of the trading puzzle.

Trading in the real world takes more than that. WAY more.

Trading smartly is all about:

Finding a good trading idea

Testing with hard data if this idea is really a good idea

Executing the idea


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



So, the question that I kept asking myself last week was

Can we take things to the next level, and build not only a single news sentiment service, but a semi-autonomous fleet of agents that can find, test and execute trading strategies as the human traders I met 13 years ago did?

And you know what?

I think WE can.

And I say WE, because I want you to join me in this journey.



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу