The following formula is involved in the calculation of optimal levels of cash (MillerOrr model):

Optimal cash level (MillerOrr model):
where F is the fixed cost of a securities transaction, V is the daily cash variance, r is the daily interest rate on marketable securities, and M is the minimum cash balance.

The following references can be used to cite this optimal cash level calculator (millerorr model):
 Soper, D.S. (2017) "Optimal Cash Level Calculator (MillerOrr Model) (Online Software)", http://www.danielsoper.com/fincalc. 
 Lee, A.C., Lee, J.C., and Lee, C.F. (2009). "Financial Analysis, Planning and Forecasting: Theory and Application", London: World Scientific Publishing. 