# Meaning of Rebalancing the Gamma in Options?

What does rebalancing the gamma mean?

In the Book: Dynamic Hedging at the beginning says:

• Rebalancing the gamma corresponds to buying and selling the underlying security in order to replicate the payoff of the option.

Gamma shows the rate of change of delta. How exactly can i buy the underlying security (in what quantity?) so that i rebalance the gamma? Is the gamma only for me? No it is for the stock just as the price. So how can i buy or sell to rebalance the gamma of a security? How buying and selling at the same time will replicate the payoff?

If you have a portfolio $$P$$ made up of $$n_S$$ shares of stock $$S$$, and of $$n_1$$, $$n_2$$ option calls $$C_1$$, $$C_2$$ on $$S$$ (options 1 and 2 differ in strike price or expiration), pursuing a gamma hedging strategy would imply to achieve neutrality on the Delta $$\Delta_P$$ and Gamma $$\Gamma_P$$ overall values of your portfolio:
\begin{align} \Delta_P &= n_S \Delta_S + n_1 \Delta_{C1} + n_2 \Delta_{C2} = 0\\ \Gamma_P &= n_S \Gamma_S + n_1 \Gamma_{C1} + n_2 \Gamma_{C2} = 0 \end{align}
Say you know $$\Delta_S$$, $$\Gamma_S$$, $$\Delta_{Cx}$$, $$\Gamma_{Cx}$$ from the markets, and you want to achieve Gamma neutrality for $$n_S = 100$$ stocks $$S$$. Then you solve the system above to find the quantities $$n_{1,2}$$ of options you should own in order to hedge your portfolio against brusque variations in the price of the underlying you would not be able to prevent relying only on Delta hedging.