Hi & welcome. Leveling compound would work, but you should think about this first. If you have a particle board subfloor you need to remember that particle board is nothing but sawdust glued together. If it is warped due to moisture the strength may have been compromised. I would think about replacing it with either Plywood or OSB.
If it is warped and not been wet, look at having the home checked and possibly releveled - with a water level NOT a carpenter's level.
"If I can't fix it, I can screw it up so bad no one else can either."