The best thing to do is to find in your area a service that many mills, or even some universities do, where they analyse your pasture and find out what is missing for a decent diet.
Cows and sheep have different nutrient needs so it will be a little different for each. Together you come up with a list of ingredients that are readily available in your particular area at a good price at each season, this include some cheap byproducts like beer processing or many others that you might by luck be close to the source.
This list of ingredients will be different for most areas.
Growing your own feed will be not be cost efficient most of the time, because small scale grain production where the harvesting has to be done by hand because a combine won't work in such a small quantity will be more expensive than buying from a larger operation, that have economy of scale, but probably you could grow at least one of the ingredients. I have 13 cows and 60 milk sheep and I produce almost entirely on grass, (a mix of perennial ryegrass, orchard, white clover, in irrigated pastures and I supplement with corn that I also grow, I am on a low input system that produces less milk but at a very low cost.
At the end of the day you should find a diet that allows you to produce each gallon of quality milk at the lowest cost possible (unless your operation is a hobby farm)
In a cheese making business the most important number for the bottom line by far is the price of the milk (bought or in-house)