It is, and it’s difficult. Perhaps fundamentally impossible, given it would have to predict consumers’ tastes and preferences to estimate B2C companies’ creditworthiness.
Rates are negotiated instruments, a combination of the return on safe assets today, the risk of that rate changing tomorrow, and the credit profile and availability of borrowers. There is no known algorithm which can robustly balance these variables. If it were discovered, it would be worth billions, perhaps more, and fundamentally change finance. Pretty much every crisis has a story about smart people thinking they’ve solved this problem in some narrow niche of the economy and then being shown disastrously wrong.
It can't be done by one individual for the whole market, but the invisible hand does a pretty good job. The principle of a market as a whole establishing prices, rates, etc. is widely accepted.