So, huge caveat here, but this does not work haha. What I mean is, your prediction is not founded on enough data. There's no reason to assume that you can find G2 using only G1 & D1. You should expect a ton of other information to also be relevant here (how does your model take into account world/business news, or correlated assets, or the broader market, etc.). Even if you had enough data, the choice of your prediction model is a *very hard problem*, and the model choice itself will depend on another number of factors (like the type of asset, the conditions of that asset's market, whatever pricing theory is relevant, etc.)
If you'd like to read into this more, Tsay's *Analysis of Financial Time Series* is a great text for you. To get the most out of it though, you'll need a good background in probability and statistics. It also helps to have some exposure to pricing (fixed income, multiple-period, options, etc.)