Taxation for a working holiday visitor

I'm eligible for a working holiday visa as a Canadian citizen. (It's a 1-year visa extendable by another year, but I'm currently the cut-off age of 30 so it's not clear whether I can extend once I'm 31). I'm looking at moving, but I've been living in the United States (not as a citizen) for many years. That has me confused over the tax situation: My understanding is that I'd be a nonresident of Japan for tax purposes for the first year. I know I won't be a tax resident of the US because I'm not a citizen or visa holder and I'll completely leave the country. What confuses me is whether I would be exclusively subject to Japanese tax or whether I would be a tax resident of Canada. Intuitively and with the tie-breaker rules in the Wiki it makes sense that I'd only owe taxes to Japan: I would have my own address in Japan and spending all my time there whereas I just stay with my parents when I'm visiting Canada. But the "non-resident" designation gives me pause. In my case, it's relevant because I expect to be trading stocks in a US account and earning capital gains income, which would not be taxed by Japan since I would not remit it to Japan. Does anyone have experience dealing with anything like this?

by caillouminati