refactor: create CoinProfitabilityLibrary

new library to facilitate CLI version