# Investing

**Investing** agents differ from **trading** with a mid- and long-term approach. They aim to gradually accumulate assets or to optimize a portfolio according to defined goals.

Unlike trading, an investing agent can include **only entry rules** (with no exit rules), notably if the goal is to **build a portfolio without systematic selling**.

{% hint style="success" %}
A good way to write clear rules is to ask yourself:

"If I were teaching my strategy to someone else using only these rules, would they understand everything or would they have questions on unclear aspects?".

If the answer is YES, your rules are clear and you can create your agent.\
If the answer is NO, you should clarify them to avoid any ambiguity.
{% endhint %}

## Examples

<mark style="color:purple;">Example #1 — Progressive investing (DCA)</mark>

Buy $50 of Bitcoin every first Monday of the month at 10 AM.

***

<mark style="color:purple;">Example #2 — Automatic portfolio rebalancing</mark>

Build a portfolio of 30% Bitcoin, 40% S\&P 500 and 30% CAC40.

Each quarter, invest $500 and rebalance the portfolio to maintain this allocation.

***

<mark style="color:purple;">Example #3 — Conditional investing</mark>

Start a $1,000 portfolio with 40% stocks (Tesla, Microsoft), 30% crypto (Bitcoin, Ethereum) and 30% currencies (EURUSD, JPYUSD).

Inject $100 each month into the asset with the lowest performance the previous month to smooth volatility.

***

<mark style="color:purple;">Example #4</mark>

I want to build a portfolio of 25% Apple, 25% Bitcoin, 25% Tesla and 25% Microsoft, injecting $100 of capital every month.

Sell 50% of my portfolio if gains reach +30%.

***

<mark style="color:purple;">Example #5</mark>

Create a portfolio with 25% Apple, 25% Bitcoin, 25% S\&P 500 and 25% Gold.

Rebalance every month and inject $100.

If an asset drops more than 10% in a month, halve its allocation and redistribute on the others.

***

<mark style="color:purple;">Example #6</mark>

Create a portfolio with 25% Tesla, 25% Bitcoin, 25% S\&P 500 and 25% oil.

Every month, inject $100 and allocate the capital only to the two assets with the best performance over the last 6 months.

***

<mark style="color:purple;">Example #7</mark>

Build a portfolio of 50% Bitcoin and 50% Nasdaq with $200 starting capital.

Then, invest $200 each month, split across these 2 assets.

If the Nasdaq drops at least 5% from one month to the next, invest in Gold instead of the Nasdaq for the following month.

For Bitcoin, same logic but if the drop is at least 10%.

***

<mark style="color:purple;">Example #8</mark>

Build a portfolio of 30% defensive assets (Gold, Silver) and 70% speculative assets (Tesla, Apple, Alphabet, Meta, Amazon).

Invest $500 per quarter.

If a speculative asset performs above +15% over a quarter, sell half of the gains and redistribute equally on the defensive assets.

***

<mark style="color:purple;">Example #9</mark>

Invest $1,000 initially split between Bitcoin, USDJPY, Amazon and S\&P 500.

Each month, inject $100 split across the two assets with the lowest performance over the last 90 days.

***

<mark style="color:purple;">Example #10</mark>

Invest $100 per month split between Bitcoin, Gold and Nasdaq.

If an asset is below its 200-day moving average, double the investment on it the following month to take advantage of a possible rebound.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.obside.com/agents/create-an-agent/examples/investing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
