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

Unlock this course with a free trial

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

Testing strategies in Stata

Testing strategies in Stata

- [Instructor] Once you've gone through and developed your basic strategy, you'll need to actually go and test that strategy to see if it makes money, right? I'm in the 04_05 begin due 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 to the Thai baht. We hypothesize 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 arb profit. And that arb profit variable is simply going to be based on the US dollar to Thai baht exchange rate, minus the triangular arb exchange rate. So it's the difference between these two exchange rates, right? Triangular arb represents the indirect exchange…

Contents