That is a question that remains to be answered, and is only just beginning to be looked into through research on epigenetics[1].
Yet I remember reading a study that showed that black children from Africa adopted by white parents in Germany performed at the same level as their peers. There have been other such studies with very similar conclusions.
In scenarios like that, it's also difficult to control for the impact of different level of support for students in academic matters. For example, focused support for under-performing students compared to relatively relaxed support for students meeting expectations.
I could probably also see the impact of different psychological factors associated with being adopted by a family on a different continent being hard to control for.
My mistake. I was incorrect about the study being related to adoptions. It was actually something interesting that happened in Germany. I had read an environmental interpretation of the Eyferth Study: https://en.wikipedia.org/wiki/Eyferth_study
Even this statement isn't as absolute as you seem to think it is. Your genes may or may not express based on the environment in which you grow up. Primarily genetically determined doesn't make sense, since genes aren't working in a vacuum.