{adamcoding}
Preface

Preface & Dedication

For Valy and Mia.

I look for shortcuts in life, trying to hack anything that's hackable. With the two of you I do the opposite: I count the seconds so time flows slower, and stare into your eyes, into the infinity of love. We can't hack love, or a smile, or a memory - but we can hack everything else, to have more of what matters. Together.

How this book happened

I did not set out to write a book. I set out to answer a question that would not leave me alone: could I actually build the thing? Not a strategy that makes money, but the machine underneath it, the honest simulator that tells you the truth about an idea instead of the flattering version.

I am a software engineer. I spend my working days with systems that are meant to be deterministic, and I came to markets the way a lot of engineers do, half curious and half arrogant, convinced that rigor would be enough. It was not. What I learned, slowly and mostly in the evenings after everyone else in the house was asleep, is that the market does not care how clean your code is. It taught me more about my own thinking than any codebase ever has.

So this book is really two things wearing one cover. On the surface it teaches Go, from the first line you type to a working backtester you built yourself. Underneath, it is about a habit of mind: the discipline of asking, of any number you are handed, how many things were tried before this one was shown to me. That question has made me a better engineer, and I think it will do the same for you, whatever you end up pointing it at.

I wrote it in my own time, for the pleasure of understanding something difficult and writing it down clearly. If it saves you some of the confusion it cost me, that is enough.

Type the code. Don't copy-paste it. That is the whole method, and it is the one thing in here I am certain about.

Adam Piasecki