Does anyone know how to adjust trading volume based on stock splits?

Here is an example of ANA (9202.T) on 2017-09-27.

A stock split happened with factor 1:10.

DateTime                Open    High    Low     Close   TradedVolume
2017-09-26 15:00:00     423.0   423.0   423.0   423.0   3787000

DateTime                Open    High    Low     Close   TradedVolume
2017-09-27 09:00:00     4206.0  4209.0  4201.0  4208.0  829700


Do I just need to divide TradedVolume by a factor of 10 and multiply the prices by 10, before the split?

In this case I would get the adjusted values to be:

DateTime                Open     High     Low      Close   TradedVolume
2017-09-26 15:00:00     4230.0   4230.0   4230.0   4230.0  378700

DateTime                Open     High     Low      Close   TradedVolume
2017-09-27 09:00:00     4206.0   4209.0   4201.0   4208.0  829700


This seems the most natural to me as we keep the total value (price*volume) constant.

Looking forward to hearing your thoughts.

Simple:

1. Divide the share price by the split factor.
2. Multiply the volume by the split factor.

Let's use Apple's 7/1 split from Monday June 9, 2014 as an example.

The split factor was 7/1 or 7.

The closing price on Friday June 6, 2014 was 645.57 and the volume was 12497800.

After the split, the closing price for Friday June 6, 2014 was adjusted to 92.22 and the volume increases to 87484600.

1. 645.57 / ( 7 ) = 92.22
2. 12497800 * ( 7 ) = 87484600

For a reverse split, the calculation is the same but the share price will increase and the volume will decrease because the split factor is a fraction. In a 1/4 reverse split, the split factor is (1/4) or 0.25.