Suppose that a firm engages in a derivative transaction that qualifies for fair value hedging. The firm holds a security and hedges it by selling a derivative. During the course of the hedge, the security increases in value by $20,000, while the derivative decreases in value by $22,000. Explain what accounting entries would be done and how the firm's earnings and balance sheet would be affected.