Библиотека / Финансы, счета и бухгалтерия
Финансы, счета и бухгалтерия
Автоматическая торговля акциями через Alpaca по оценкам настроений
По расписанию рабочий процесс читает оценки настроений из Google Sheets, выбирает лучшие акции с помощью Gemini и размещает ордера Alpaca на покупку и продажу, записывая балансы.
Что делает
## 3. Trading Logic and Execution ⚙️ create_positions_to_close_and_positions_two_open: This is the core logic of your trading strategy. The code compares the stocks you currently hold with the top four sentiment stocks for the day. It identifies which of your current positions are no longer in the top four and marks them to be sold. It identifies which of the top four sentiment stocks you do not currently own and marks them to be bought. It calculates the total market value of the positions to be sold and divides that amount equally among the new stocks to be purchased. positions_to_close: This node takes the list of stocks to be sold and processes them one by one. Alpaca-post-order-sell: For each stock in the "to-sell" list, this node sends a "sell" order to Alpaca to close the position. Wait: A two-minute pause is implemented to ensure that the sell orders are processed and the funds are available before the buy orders are placed. positions_to_open: This node takes the list of top-sentiment stocks that you don't currently own. Alpaca-post-order-buy: For each of these stocks, a "buy" order is sent to Alpaca using the allocated portion of the funds from the sold assets.
Шаги
- Alpaca-get-account-info
- Alpaca-post-order-sell
- Alpaca-post-order-buy
- filter_top_sentiment_score
- read_sentiments_score_today
- write_account_balace_today
- Alpaca_get_open_positions
- create_positions_to_close_and_positions_two_open
- positions_to_open
- positions_to_close
- merge_orders_to_write_to_sheets
- Google Sheets
- Wait
- Schedule Trigger
Похожие автоматизации
Финансы, счета и бухгалтерияИзвлечение чеков об оплате YAPE из Telegram в Google SheetsШагов: 14Финансы, счета и бухгалтерияСинхронизация счетов OVH с Sheets и DriveШагов: 13Финансы, счета и бухгалтерияЗапись чеков из бота LINE в Google Sheets с помощью OCRШагов: 7Финансы, счета и бухгалтерияУчёт расходов в Google Sheets с помощью агента OpenAIШагов: 9