PineUtility: Computes a differentiable utility score for one asset’s signal vector using a rational exponential form. Formula: f = (Σₖ aₖ·e^(bₖ·sₖ)) / (Σₖ cₖ·e^(dₖ·sₖ))
PortfolioAllocation: Allocates capital into assets based on signal-derived ratios and current unit prices. Solves A·x = b where A is the diagonal price matrix, x is the asset count vector, and b is total asset value vector.
Copyright (C) 2026 Safepine LLC
This file is part of Safepine OS.
Safepine OS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Safepine OS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Safepine OS. If not, see <https://www.gnu.org/licenses/>.