Bring a large pot of water to a boil. Cook yam in the boiling water until tender, about 30 minutes. Drain and cool until easily handled. Peel and thinly grate the flesh.
Melt butter in a wok over medium heat. Stir in condensed milk and vanilla extract. Add grated purple yam. Reduce heat to low and cook, stirring constantly, until mixture is sticky but not dry, about 30 minutes. Pour in evaporated milk; cook and stir for 15 minutes. Remove from heat.
Transfer yam mixture to a container and cool to room temperature, about 30 minutes. Chill before serving.