I want to trade two stocks like this: long stock A and short stock B meanwhile; I have back test for this like this: take one day for example, this day's return is "closeA/openA-closeB/openB"; I find this back test is well,but the back test is based on that stock A and stock B were traded by the same money; in the fact I can't make this exactly, especially when prices of them is much different, such as price of A and B are 5563 and 7526. How shall I handle this problem, especially when I don't want to trade much money at the very beginning? or how shall I modify back test method on "closeA/openA-closeB/openB";?
The long/short portfolio can offset risk but not margin. I can't speak to the statement " I don't want to trade much money at the very beginning," as that will limit you. alos, Realtick is not free. I can tell you that we offer RealTick which has a server-side pairs trader. https://www.lightspeed.com/trading-platforms/realtick-pro-and-express/ or you can execute from a spreadsheet: You can set up the pairs as dollar neutral or any ratio that makes sense to you. The margin requirment in a Reg-T margin account will be high overnight, Bob
Cf. there are tons of books about diff ways to hedge- $ neutral, Beta neutral, options,etc. Check out "Trading PAirs" by Whistler. I am sure there are countless others-some free.. I do think it is a very crowded space though...