Can avocado substitute the usual fat in cake baking? If so, what's the ratio to other ingredients?
The simple answer is not really.
Avocados have a high fat content relative to other fruit, but they're only about 20% fat, which is much less than any other cooking fats.
If you add enough avocado to provide the fat content for a cake, you'll also be adding too much water and all the other flavours of avocado, which I assume you don't want.
It likely depends on how the fat's being used. Although I have no experience with replacing fat in cakes specifically, I would suspect that you'd have better luck with cakes in which it calls for creaming butter or other solid fat together with the sugar.
For those in which the fat is liquid (oil or melted butter), you'd likely want to try to mash up the avocado as much as possible (possibly with a food processor or blender), and incorporate gently to avoid developing too much gluten.
I'd probably go with my experience in replacing fat in muffins, and only try replacing half of the fat the first time, and see how it behaves. If it's calling for liquid fat, I might actually try only replacing a third of the fat the first time.