[{"data":1,"prerenderedAt":192},["ShallowReactive",2],{"articles-en":3},[4,155],{"id":5,"title":6,"body":7,"date":144,"description":145,"extension":146,"locale":147,"meta":148,"navigation":149,"path":150,"readingTime":151,"seo":152,"stem":153,"__hash__":154},"posts\u002Fen\u002Fposts\u002Freinforcement-learning-bitcoin-trading.md","Reinforcement Learning for Bitcoin Trading",{"type":8,"value":9,"toc":136},"minimark",[10,14,35,40,51,54,64,67,71,74,80,86,89,92,96,99,102,105,108,112,115,118,127,133],[11,12,13],"p",{},"In 2025, I had the opportunity to turn one of my interests in software and financial markets into an academic research paper.",[11,15,16,17,21,22,26,27,34],{},"Together with Sumanto, Indra Chaidir, and Adi Supriyatna, I published ",[18,19,20],"strong",{},"“Reinforcement learning for bitcoin trading: A comparative study of PPO and DQN”"," in ",[23,24,25],"em",{},"Jurnal Mandiri IT",", Vol. 14 No. 2, pages 159–169. The paper was published on August 22, 2025, and is available through DOI ",[28,29,33],"a",{"href":30,"rel":31},"https:\u002F\u002Fwww.ejournal.isha.or.id\u002Findex.php\u002FMandiri\u002Farticle\u002Fview\u002F455\u002F457",[32],"nofollow","10.35335\u002Fmandiri.v14i2.455",".",[36,37,39],"h2",{"id":38},"what-we-studied","What we studied",[11,41,42,43,46,47,50],{},"The main question was fairly straightforward: how do two deep reinforcement learning approaches, ",[18,44,45],{},"Proximal Policy Optimization (PPO)"," and ",[18,48,49],{},"Deep Q-Network (DQN)",", behave when applied to Bitcoin trading?",[11,52,53],{},"Bitcoin is an interesting environment for this kind of experiment because its price can move through very different market regimes. A strategy that behaves well during a strong uptrend does not necessarily behave the same way when the market becomes sideways or unstable.",[11,55,56,57,60,61,34],{},"Our experiments used hourly ",[18,58,59],{},"BTC\u002FUSDT"," data covering 2019 to early 2025. Instead of feeding the models raw price data alone, we built the trading state from several technical indicators, including ",[18,62,63],{},"RSI, MA20, volatility, MACD, volume trend, SMA200, and a weekly trend filter",[11,65,66],{},"The goal was not to build a system that could magically predict Bitcoin's next move. The focus was on observing how different reinforcement learning agents learn to make trading decisions under changing market conditions.",[36,68,70],{"id":69},"ppo-vs-dqn","PPO vs. DQN",[11,72,73],{},"One of the interesting parts of the research was seeing how differently the two algorithms behaved.",[11,75,76,79],{},[18,77,78],{},"PPO tended to trade more aggressively."," During bullish phases, this behavior could translate into stronger performance because the agent was more willing to participate in the market. The trade-off was greater exposure to unstable conditions.",[11,81,82,85],{},[18,83,84],{},"DQN behaved more selectively."," It generally made fewer decisions and showed more stable behavior when the market was sideways or choppy.",[11,87,88],{},"That difference was more important to me than simply asking which algorithm was better. The experiment suggested that the characteristics of an agent can interact heavily with the market regime it is operating in.",[11,90,91],{},"In other words, reinforcement learning for trading is not just about choosing a more sophisticated algorithm. It is also about understanding the environment in which that algorithm is expected to operate.",[36,93,95],{"id":94},"what-i-learned","What I learned",[11,97,98],{},"This research changed the way I think about the intersection between software engineering, machine learning, and financial systems.",[11,100,101],{},"A trading system is not simply a prediction model wrapped in an API. There are many layers involved: data preparation, feature construction, environment design, reward formulation, training, evaluation, and finally the interpretation of results.",[11,103,104],{},"The work also reinforced an important lesson about backtesting. A model can appear impressive in one market condition and behave very differently in another. That makes it dangerous to interpret a single performance result as proof that a strategy will work in the future.",[11,106,107],{},"For me, the most interesting result was therefore the difference in behavior between PPO and DQN rather than a simple winner. PPO and DQN showed complementary characteristics across different market regimes, which is a useful perspective when thinking about adaptive trading systems.",[36,109,111],{"id":110},"the-paper","The paper",[11,113,114],{},"This was my first published research work in this area, and it sits at an interesting intersection of several things I enjoy: programming, data, machine learning, and financial markets.",[11,116,117],{},"The full paper is available here:",[11,119,120],{},[18,121,122,123,126],{},"Prasetyo, R. E., Sumanto, S., Chaidir, I., & Supriyatna, A. (2025). ",[23,124,125],{},"Reinforcement learning for bitcoin trading: A comparative study of PPO and DQN",". Jurnal Mandiri IT, 14(2), 159–169.",[11,128,129],{},[28,130,132],{"href":30,"rel":131},[32],"Read the paper via DOI",[11,134,135],{},"This article is a personal summary of the research rather than a replacement for the full academic paper.",{"title":137,"searchDepth":138,"depth":138,"links":139},"",2,[140,141,142,143],{"id":38,"depth":138,"text":39},{"id":69,"depth":138,"text":70},{"id":94,"depth":138,"text":95},{"id":110,"depth":138,"text":111},"2025-08-22","A personal note on my research comparing PPO and DQN for Bitcoin trading across different market conditions.","md","en",{},true,"\u002Fen\u002Fposts\u002Freinforcement-learning-bitcoin-trading","4 min",{"title":6,"description":145},"en\u002Fposts\u002Freinforcement-learning-bitcoin-trading","iFvLakLuZ6DU7wmy9di5y3MeIOVoljRTEz7F-C7z8x8",{"id":156,"title":157,"body":158,"date":184,"description":185,"extension":146,"locale":147,"meta":186,"navigation":149,"path":187,"readingTime":188,"seo":189,"stem":190,"__hash__":191},"posts\u002Fen\u002Fposts\u002Fcoding-journey.md","Notes from my coding journey",{"type":8,"value":159,"toc":180},[160,163,167,170,174,177],[11,161,162],{},"The writing section on this site is where I keep notes about things I am learning, building, or cleaning up.",[36,164,166],{"id":165},"what-gets-written-here","What gets written here",[11,168,169],{},"I work across web, backend, and mobile: Nuxt, Vue, Node, Go, Flutter, Laravel — plus internal tools that need clear data flow. Not every post has to be a long tutorial. Sometimes a note about a technical decision, an interesting bug, or a small pattern worth remembering is enough.",[36,171,173],{"id":172},"why-articles-help","Why articles help",[11,175,176],{},"Writing helps me review how I think while building. If a solution is hard to explain clearly, there is usually some part of the architecture or the flow that is not yet clean enough to explain.",[11,178,179],{},"More notes will arrive as I work and find something worth recording. This is better written from real experience than produced just to fill a page.",{"title":137,"searchDepth":138,"depth":138,"links":181},[182,183],{"id":165,"depth":138,"text":166},{"id":172,"depth":138,"text":173},"2023-08-17","An introduction to the writing section — notes on software engineering, product work, and things I am still learning.",{},"\u002Fen\u002Fposts\u002Fcoding-journey","2 min",{"title":157,"description":185},"en\u002Fposts\u002Fcoding-journey","v3UoQGpIUWAvZDvvjW4y9DdOlXcwP9y-qjVfftBY2WM",1789641310768]