To avoid getting anti-aired with close MK you need to space yourself so that you attack with the tip of your feets.
Yang is one of my favorite matchups just because he can’t really defend himself. He has no high invulnerability moves. Even his super will lose to a throw (or karakusa). Just try to get a knockdown with a sweep or a dash in throw and then you get to start poning him.
Once you get meter the match becomes even more in your favor because Yang has to guess between Karakusa (Good damage, 50% stun) VS crouching LK->LP hayate -> SA1 (50% damage, good stun).
For defensive strategies, just practice parrying dive kicks. Also, once you play against the twins enough you’ll start understanding how much frame advantage they have after their dive kicks just by seeing where they hit you. Example: If you block an HK dive kick to the face then you can pretty much throw Yang before he can do anything.
When Yang knocks you down in the corner he will go for crossup dive kicks, so make sure to block those. AFTER a crossup dive kick many people make the mistake of thinking they can move but in reality they are still in Yang’s pressure string. Don’t try to move unless you really think he’s gonna grab. Instant Air Tsurugi can be really good here for avoiding throw setups and even goes over low attacks.
Learn to block slash pressure strings and try to jump away. Yang will try to stop your jump outs with crouching LK -> slashes.
If you think you can get the timing down, learn to red parry crouching MK->LP Slash. Many Yangs sort of take this for granted as something they can just DO to start up pressure and get free meter, once you red parry it you become very scary vs Yang.