  This study aims to investigate the behavior of stock prices throughout the
episodes of foreign capital flows using data of daily stock prices and
quarterly foreign capital flows from 14 EMEs. To this end, the episodes of
capital flows are identified using the threshold and the k-means clustering
approaches. Next, the stock index changepoints are detected using the Pruned
Exact Linear Time (PELT) method. Finally, we combine the results by
distributing the detected changepoints over the identified capital flows. The
results reveal that the stock indices have been rarely pushed further during
the entire surge episodes identified by both approaches, and thus surges of
capital flows do not necessarily lead to further appreciation of stock prices.
In the meantime, a significant appreciation of stock prices is observed during
the normal state of capital flows. On the other hand, it is noticed that the
stock prices have not often depreciated during the episodes of foreign capital
outflows in all the selected EMEs, which means that stock prices have been less
vulnerable to reversals of foreign capital flows
