Looking for appropiate t-test I have a dataset that includes the daily price of 100 stocks over 10 years. Additionally, this dataset also includes the information of traders that allows me to divided traders into domestic and foreign traders.
Now, I want to conduct a t-test to find whether the stocks traded by domestic traders is statistically different from these traded by foreign traders. 
However, some stocks are traded by other types of traders. In this context, can I directly use two-sample t-test? or I should consider the two groups are overlapping and use other t-test.
 A: Short Answer
You can't use any simple T-test to extract too much meaningful information from two groups of investors for broad questions.
Longer Answer
I'm adding some assumptions because it is possible that the answer to your question will depend on a number of things. There just is not enough information provided to provide you with a meaningful answer. This will not be a satisfying reply, but it should give you some directions.
The t-test
The "normal" t-test assumes that the samples are independent (either rigorously or at least "mostly") in all respects. [Note with large sample sizes, semi-independent samples can give substantially similar results to independent samples in some cases].
Unfortunately, stock prices and purchase activity are the antitheses of independent. In other words, the probability of investor 1 investing 100 after investing 1000 is not the same as it is after investing 10, 50, 1,000,000 or 12. Also that the probability that investor 2 will invest is not independent of investor 1 (it's not) nor is domestic vs domestic, domestic vs foreign, etc. And to gets worse. The proximity in time of the trades to each other will affect the level of dependence (and the timezones of the investors will have an effect too). The interdependence will also change over time with some cyclic components (Monday vs. Friday, Sommer vs. Fall, etc.).
None of these relationships and samples are truly independent and you can prove to yourself that this is not the case logically as well as if you test for independence in your data. Therefore, any answer you get may be somewhat useful, but you will not be able to rely on the t- and p-values the t-test provides you in any rigorous sense.
There are many other issues with stocks that have many complex interrelations, confounders, and feature constraints that make them particularly difficult to apply rigorous statistics to.
Using the dependent t-test is certainly better, but in the case of stocks across investors, the values are not "paired" as the dependent test expects. They behave more like chaotically-dependent variables in many respects. Furthermore, stock prices are not normally distributed (are highly skewed), and the different groups are likely to have different variances.
So, it is possible to use classical statistics to make some meaningful assertions about stock prices and investor behavior, but you need to narrow down the scenario a lot before someone can say if it applies to what you're trying to do.
Conclusion
If you provide a more concrete example including the type of data (investor A buys stock B at price C at date-time D and is/isnot domestic) and the exact question (do domestic investors but stocks of B at an average price that is different from foreign investors?) there may be a more satisfying answer. For the example, a dependent t-test bay be "good enough". If you are also correlating time of purchase and/or pairing blocks of times or tickers, then we're back to no good answer.
NOTE: if you come up with a rigorous and meaningful way to (1) determine if two groups of investors are correlated and you can (2) do so in a time-deferred manner and that (3) the correlation is both real and not ephemeral (or if you can predict the onset and duration of the correlation) and (4) someone is not already doing that, you'll be rich.
