From the course: Algorithmic Trading and Finance Models with Python, R, and Stata Essential Training (2019)

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Testing strategies in Stata

Testing strategies in Stata

and developed your basic strategy, you'll need to actually go and test your strategy to see if it makes money, right? I'm in the 04_05_Begin Do-File, and the 04_05_Begin.dta file in Stata. Now we've gone through and previously developed this triangular arbitrage strategy which is built around moving from the US dollar to the Yen and then the Yen We hypothesized that we can make money arbitraging the difference between that triangular approach to the exchange rate versus simply going directly from the US dollar to the Thai Baht. Now we actually need to test that and see if we'll in fact make money. To do that I'm going to create a new variable that I'll call ArbProfit, and that ArbProfit variable is simply going to be based on the US dollar to Thai Baht exchange rate, minus the TriangularArb exchange rate. So it's the difference between these two exchange rates, right? TriangularArb represents the indirect exchange rate, then we have the US dollar, Thai Baht exchange rate. If there's a…

Contents