콘텐츠로 건너뛰기
Reddit

알고리즘 트레이딩 봇 만드는 방법 공유해 주세요! 🤖

r/Daytrading 조회 1
원문 보기 →
💡

알고리즘 트레이딩 봇을 직접 만들어 보았지만 아직 성과가 좋지 않아 조언을 구합니다. 올바른 개발 프로세스를 알고 싶으며, 해결책보다는 기본적인 단계와 접근법에 집중하고 싶습니다. 이 글을 통해 알고리즘 트레이딩 시작 시 핵심적인 요소와 현실적인 조언을 함께 살펴보세요.

안녕하세요, 저는 2월부터 알고리즘 트레이딩 봇을 만들기 시작했는데 아직 만족스러운 결과가 없습니다.

많은 연구와 개발, 백테스트, 모의투자를 해봤지만 성과가 계속 좋지 않네요.

정말 성공한 분이 있다면 그 개발 과정을 공유해 주실 수 있을까요?

여기서 원하는 건 해법이나 비밀이 아니라, 구체적인 프로세스입니다.

예를 들어, 마지막 몇 초/분/시간 동안의 시장 상태를 감지하는 모델을 만들고, 현재가 평균회귀인지 돌파인지 구분하는 모델을 만드는 등의 큰 흐름만 알려주시면 됩니다.

이미 AI와 구글에서 정보를 많이 찾아봤지만 99%는 쓸모 없었고, 그래서 제대로 된 해법도 찾기 힘들었던 것 같습니다.

💬 원문 댓글 (10)

u/-Fa******* ▲ 6
* 1단계: 수익이 나는 전략을 준비하세요.
* 2단계: 사람이 개입하지 않아도 작동하는 전략 규칙을 수치화하세요.
* 3단계: Python이나 TradingView로 규칙대로 백테스트해서 손익분기점 근처인지 확인하세요.
* 4단계: 가능성이 있으면 Python으로 본격 개발에 들어가세요.
* 5단계: 알고리즘 매매를 지원하는 중개 계좌를 개설하세요 (예: Alpaca 등).
* 6단계: 스크립트를 계좌에 연결하세요.
* 7단계: 모의투자 계좌에서 여러 사이클로 테스트하세요.
* 8단계: 수익이 나면 실거래에 사용하세요.
원문 보기
* Step 1: Have a working strategy that's profitable
* Step 2: Quantify the rules of your strategy so that they work without human intervention
* Step 3: Backtest the loose idea, following the rules you just created, using Python or trading view, to see if it's remotely close to breakeven or profitable
* Step 4: If it shows promise, then commit to full development in python
* Step 5: Open a brokerage account that allows algorithmic trading, like Alpaca or similar
* Step 6: Connect your script to your account
* Step 7: Run it against a paper trading account for X cycles/sessions
* Step 8: If profitable, use it for live trading
u/Joh******** ▲ 3
무엇을 물으시는지 잘 모르겠습니다. 트레이딩 봇 프로그래밍 자체에 대한 기본적인 질문인가요, 아니면 트레이딩 봇에 적용할 전략을 찾는 건가요?
원문 보기
I don't understand what you are asking for. Are you asking how to program a trading bot (like the fundamentals of how a trading bot functions)? Or are you asking for a strategy to plug into a trading bot?
u/eba******* ▲ 3
코딩 관련해서는 Claude에게 물어보세요.
원문 보기
ask claude coding
u/lgb*** ▲ 2
Claude가 최고의 조력자입니다. 저도 1월에 완전 처음 시작했는데 지금 잘 작동하고 있어요.
원문 보기
Claude is your best friend. I started from zero in January and mine works great.
u/pri********* ▲ 1
저와 친구는 뉴욕장 중에 5개, 아시아장 중에는 1개의 알고리즘 봇을 돌리고 있습니다. 준비할 게 많죠. 알림 설정해둬서 신호가 뜨면 바로 대응하고 있어요.
원문 보기
My friend and I have 5 algo bots running during NY and 1 during Asia. It’s alot that goes into it. We have the alert/notifications set so once they pop, we hop in.
u/Hor*************** ▲ 1
인간 논리를 기계에 억지로 적용하려 하네요. 세부 사항에 너무 매달리지 말고 머신러닝과 데이터베이스 구조를 공부해 보세요.
원문 보기
Your trying to force human logic into a machine your filling in too much details. Try research machine learning and database structures.
u/sin************ ▲ 1
"이 경우 AI는 99% 엉터리 정보에 기반한다"고 하셨는데, 이 세상은 그런 정보가 넘치는 시대입니다.

'1. 최근 몇 초, 분, 시간 동안 시장 상태를 탐지하는 모델 만들기'
'2. 평균 회귀인지 돌파인지 구분하는 모델 만들기' 같은 건 시작하기에도 훨씬 뛰어넘는 단계입니다. 알고리즘을 시작하기 전에 제대로 해야 할 기본적인 것들이 너무 많아요.

초기에는 데이터, 중개 연결, 과거 데이터 저장 등 인프라 작업도 필수입니다.

기술과 인프라가 준비되면 가장 먼저 해야 할 일은 위험 관리입니다. 이 서브레딧에서 말하는 포지션 제한이나 손실 제한 같은 겉으로 보이는 위험 관리가 아니라 내가 어떤 위험에 노출되어 있는지 정확히 이해하는 진짜 의미의 위험 관리입니다.

예를 들어, 특정 선물과 주식을 보유하고 있을 때, 내가 유로달러, 아시아 주식, 기술주, 영국 금융주, 미국 대비 유럽 주식 수익률 등 어떤 위험에 얼마나 노출되어 있는지 평가하고 조절하는 거죠.

이것들이 알고리즘의 기본 중 기본이며 알파(초과 수익) 연구는 이런 위험 관리 시스템이 갖춰져 있어야 의미가 있습니다.

위험 관리 체계를 세우고 나면 매우 기본적인 거래부터 시작할 수 있고, 위험 허용 범위를 설정해 그 안에서 전략을 운용하세요.

예를 들어 분산된 위험을 항상 일정 수준 이상으로 유지하며 가격 조정 때 조금 사고 반등 때 조금 파는 식입니다. 이러면 타이밍과 종목 선택이 별로여도 완전히 망하지는 않습니다.

그다음은 성과 분석입니다. 어디서 이익을 냈고, 어디서 손실을 보았는지, 의도하지 않은 위험 누적 문제인지, 아니면 나쁜 포지셔닝인지 분석해야 합니다.

성과 분석은 알파를 개선하는 유일한 방법입니다. 그래서 처음엔 아주 기본적인 체계로 테스트하는 게 낫습니다. 알파를 계산하는 방법도 없는데 낭비하지 마세요.

그 후에야 상태 탐지 같은 고급 주제를 다루는 게 맞습니다.

요약하면, 알고리즘 트레이딩은 쉽지 않고 부자가 되는 길로 권장하지 않습니다. 이 과정을 즐기지 않는다면 시간 낭비입니다.
원문 보기
> in this case AI is based on the 99% of bullshit that it’s online,

Welcome to the age of slop, my friend.

> 1. ?4Create a model to detect the regime in the last x seconds/minutes/hours
> 2. ?4Create a model to detect if we're in a mean reversion scenario or breakout
>
> etc…

This is already way beyond what you need to do to start an algo. There are so many basic things you need to get right before it makes sense to even start alpha research.

I won’t even touch on all the infra work that you need to do at that start, as it goes pretty much without saying (data and broker connectivity, databases for historical data, etc…).

After you have all the tech/infra, the first thing is risk management. Not the cringe _rIsK mANaGeMenT_ that people talk about in this subreddit with position limits and stop losses, but the actual institutional meaning of risk management which is to understand what risks you’re exposed to.

If your algo is short 200 contracts of September ‘26 Micro Nikkei JPY futures, long 100 shares of SPY, and long 500 shares of VT, what’s your risk exposure to EURUSD? To APAC equities? To tech? To British financials? To the outperformance of US stocks vs European stocks? …

Which factors actually matter and which don’t? How much risk exposure are you willing to run with respect to each of these buckets? How do you control it?

These are basic things in the sense that they’re foundational to an algo, not in the sense that they’re easy to do. Alpha research is almost completely a waste of time until you have a system which is aware of which risks its running and is able to keep them under control.

Once you have risk management you can start with some very basic stuff. Give it some risk constraints, and trade around them.

For example, if you put as a risk constraint that it should always try to stay long X amount of diversified risk in the broad equity market while buying a bit on pullbacks and selling a bit on rallies, you may very well underperform buy-and-hold with bad timing and stock picking (even before accounting for fees), but at least your performance shouldn’t be _too_ much worse than buy and hold, as you were also always long in aggregate.

And then comes performance analysis. Where did you make money? Where did you lose money? Is it a problem of a risk exposure building unintentionally or was it an intentional exposure that was simply bad positioning?

Performance analysis is the only way to improve the actual alpha, which is why in the previous point I suggested to implement a very basic system just as a placeholder really. It’s pointless to waste time on alpha when you have no way to measure it.

Only then it makes sense to look into regime detection and whatnot.

__TLDR:__ Algotrading isn’t easy, and definitely not a sensible path to wealth, I strongly recommend not wasting time on it unless you actually enjoy this process.
u/att****** ▲ 1
저는 Gemini를 이용해 NinjaScript로 전략 코딩하고 NinjaTrader에서 완전 자동으로 운영하고 있어요.
원문 보기
I used Gemini to code my strategy in NinjaScript and run it ninjatrader, fully automated.
u/Utu*****************
아니요.
원문 보기
No
u/mac******
성공한 비법은 사람들이 잘 공유하지 않아요.
원문 보기
people do not share successful recipies

댓글 (0)

로그인하고 댓글을 작성하세요.

아직 댓글이 없습니다.