An overdoped YBa2Cu3O7 single crystal was studied by SQUID and torque magnetometry in order to investigate the temperature dependence of the anisotropy parameter close to the transition temperature Tc (0.87Tc<T<Tc). Angle-dependent torque measurements were performed and analyzed with the widely used Kogan model [ Phys. Rev. B 38 7049 (1988)] as well as with an extended model by Hao and Clem [ Phys. Rev. Lett. 67 2371 (1991)], taking into account the influence of the vortex cores on the magnetization. Both approaches yield similar results, with an out-of-plane anisotropy parameter around 6.5 which slightly increases with decreasing temperature, and a temperature independent in-plane anisotropy parameter γab=1.12(5).