Abstract: In this talk we discuss ergodic optimization and multifractal behavior of Lyapunov exponents for matrix cocycles, and the existence of the unique equilibrium measure for subadditive potentials. We show that the restricted variational principle holds for generic cocycles over mixing subshifts of finite type, and the Lyapunov spectrum is equal to the closure of the set where the entropy spectrum is positive for such cocycles. Moreover, we show both the continuity of the entropy spectrum for such cocycles, and the continuity of the lower joint spectral radius for linear cocycles under the assumption that linear cocycles satisfy a cone condition. We also discuss the continuity of the topological pressure.