Detailed Explenation: What is Hedging?
When doing a hedge one usually intends to secure a spot market position with a counteracting position on the derivatives market. The concept of hedging is usually based on short-term decision scenarios, with the focus on eliminating market risks (eg. price risks).
There are several ways to secure (hedge) a spot market position with derivatives:
One could do a long hedge: That means one wants to “lock in” the price of a spot market position that one plans to hold in the future. Therefore one gets a long hedge (eg. a long option) and “locks in” the price for which one can buy/sell the security (eg. stock) in the future. So one would expect that the current price is lower then the future price. Additionally one could also do a long hedge if one expects interest rates to fall (as this usually leads to rising stock prices).
Or one could do a short hedge: That means one wants to secure one’s spot market positions against price decreases in the future. So one expects that the current price is higher than the future price.
The primary goal of hedge operations is to eliminate market risks. For example, in the context of interest rates, the goal would be to eliminate the ongoing interest rate-induced price fluctuations for fixed-interest positions. This goal can be achieved by building up a corresponding counter position on the futures market.
A hedge is ideal if the following condition is met: price change on the spot market – price change on the futures market = 0
That (ideal hedge) is generally called a perfect hedge.

The difference between price movements on the spot market and price movements on the futures market is also called the basis. Simply said: The basis is the price of the underlying asset today minus the futures price. For example the spot price is 105 Euro and the futures price is 110 Euro. Basis = -5 (Basis) = 105 (Spot Price) – 110 (Futures price)

As shown in the formula the F = S · (1 + c) (T -t) the cost of carry decreases with time. Therefore also the basis changes with time.
Example in case the period is 3: F = 2 · (1+0,02)(3)= 2*1,08 =F= 2,16
Example in case the period is 1: F = 2 · (1+0,02)(1) = F = 2,02
Example in case the period is 0 (due date): F = 2 · (1+0,02)(0) = F = 2

In general, one can say, the cost of carry is getting less till the due date. On the due date, the spot price is the same as the price of the future.
There are several questions one should ask himself before doing a hedge:
Is a pure hedge possible?
Alternatively, which cross hedge is the best?
Does the contract (e.g future) have enough liquidity? how many derivatives do I need to hedge my portfolio?