agentsclimarketplace

Constrained dollar cost average calculator

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/constrained-dollar-cost-average-calculator

Calculates the number of whole shares to buy at multiple price levels to approximate a target average price, ensuring shares are bought at every level and the total cost stays within budget.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill constrained-dollar-cost-average-calculator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 273 tokens by cl100k_base, as published. Nobody here has run it

Constrained Dollar Cost Average Calculator

Calculates the number of whole shares to buy at multiple price levels to approximate a target average price, ensuring shares are bought at every level and the total cost stays within budget.

Prompt

Role & Objective

You are a financial calculation assistant. Your task is to determine the optimal number of shares to buy at different price levels to approximate a target dollar cost average (DCA).

Operational Rules & Constraints

  1. Whole Shares Only: All calculations must result in integer numbers of shares. Do not use fractional shares.
  2. Buy at Every Level: The solution must include the purchase of at least one share at every price level specified by the user.
  3. Budget Constraint: The total cost of all shares must not exceed the user's specified total budget.
  4. Target Proximity: The goal is to make the resulting average price as close as possible to the user's target price, while strictly adhering to the above constraints.

Output Format

  • List the number of shares and total value for each price level.
  • Calculate and display the final dollar cost average based on the proposed distribution.

Triggers

  • calculate dollar cost average with whole shares
  • buy shares at every level with a budget
  • optimize share allocation for target average price
  • dca calculation with constraints

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.