Skip to content

Instantly share code, notes, and snippets.

View pa-0's full-sized avatar

Peter Abbasi pa-0

View GitHub Profile

Crypto Trading Bot with Narrative Prediction Strategy

Introduction

This project implements a profit-taking crypto trading bot specifically designed for Crypto.com. By leveraging narrative-based predictions using liteLLM, this bot aims to enhance exit and reinvestment decisions. Recent research has shown that narrative forecasting—using storytelling techniques to frame predictions—significantly improves the accuracy of language model predictions in financial forecasting, with up to an 80% accuracy improvement in some scenarios. This approach combines both technical analysis and narrative-based market sentiment for a unique and optimized trading strategy.

Approach

  1. Purchase Price Tracking: This script maintains records of purchase prices for each asset in a structured database using SQLite and SQLAlchemy.
  2. API Integration: The bot interacts with Crypto.com’s API to retrieve real-time market data and execute buy/sell orders.
@pa-0
pa-0 / Get-Release.ps1
Created October 14, 2024 00:58
Download a GitHub release asset from a list stored in a csv file.
#Requires -Version 5.1
#Requires -Modules PowerShellForGitHub,PSMenu
Set-StrictMode -Version 3.0
$InformationPreference = 'Continue'
function Get-PrivateRelease {
<#
.SYNOPSIS
Download a release from a GitHub repository.
@pa-0
pa-0 / git_quick_commit.txt
Created August 24, 2024 00:24 — forked from natebass/git_quick_commit.txt
Git Quick Commit
git add -A;git commit -m "🗑 Quick Commit"; git push;
@pa-0
pa-0 / Test-PSFileHash.ps1
Created August 20, 2024 10:31 — forked from SAPIENTechnologies/Test-PSFileHash.ps1
Verifies that the file hash of a PowerShell open-source installer matches expected value.
<#
.SYNOPSIS
Verifies that the file hash of a PowerShell open-source installer matches expected value.
.DESCRIPTION
Compares the file hash of a PowerShell open-source installation file to the expected file hash value. Supports
all installation file types, including msi, zip, rpm, deb, pkg, and tar.gz, beginning with installers for PowerShell
release 6.0.0.9.
To get a list of installer file names, but not test the file hash, use the ListOnly parameter.
@pa-0
pa-0 / SetHotkeyGui.ahk
Created August 11, 2024 21:07 — forked from nperovic/SetHotkeyGui.ahk
Create an interface that allows users to customize hotkeys.
/************************************************************************
* @description Create an interface that allows users to customize hotkeys.
* @file SetHotkeyGui.ahk
* @link https://github.com/nperovic
* @author Nikola Perovic
* @date 2024/04/22
* @version 1.0.0
***********************************************************************/
#Requires AutoHotkey v2
@ninmonkey
ninmonkey / Git from powershell using conditional logic to build native args.ps1
Created August 6, 2024 23:21
Git from powershell using conditional logic to build native args.ps1
using namespace System.Collections.Generic
# the final command will be
# git clone --branch release/v7.4 --shallow-since=2024-07-07 https://github.com/PowerShell/PowerShell
$cloneUrl = 'https://github.com/PowerShell/PowerShell'
$Since = [datetime]::Now.AddDays(-30 )
$Branch = 'release/v7.4'
$binGit = Get-Command -Name 'git' -CommandType Application -ea 'stop'
# this bypasses most aliases or functions named 'git'
@ninmonkey
ninmonkey / Robocopy pwsh wrapper.ps1
Last active August 19, 2024 19:33
Robocopy, a simple wrapper
using namespace System.Collections.Generic
$RoboAppConf ??= @{
Root = $PSScriptRoot | Get-Item
Log = @{
Path = Join-Path (Get-item 'temp:') 'last-robocopy.log'
}
}
function Invoke-Robocopy {
@pa-0
pa-0 / ntfs-file-system-increase-speed-performance.com
Created August 2, 2024 02:21 — forked from p3x-robot/ntfs-file-system-increase-speed-performance.com
🚄 This is a simple utility to increase the NTFS performance by turning off some NTFS features that are not so used by now (or not so important).
rem execute as an Administrator
rem based on http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/NTFS_Hacks.html
ram based on https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc938961(v=technet.10)
rem http://archive.oreilly.com/cs/user/view/cs_msg/95219 (some installers need 8dot3 filenames)
rem disable 8dot3 filenames
ram Warning: Some applications such as incremental backup utilities rely on this update information and do not function correctly without it.
fsutil behavior set disable8dot3 1
@pa-0
pa-0 / gh-org-clone-pull-create-add-push.sh
Created July 16, 2024 11:54 — forked from itsazzad/gh-org-clone-pull-create-add-push.sh
Git Organization: Clone Repo, Pull, Create Repo, Add Remote, Push
#!/usr/bin/env bash
# This script clones all repos in a GitHub org and pushes to the upstream
# It requires the GH CLI: https://cli.github.com
# It can be re-run to collect new repos and pull the latest changes
set -euo pipefail
USAGE="Usage: gh-clone-org <user|org> <target>"
@pa-0
pa-0 / mbsa.ps1
Created July 15, 2024 06:19 — forked from dfinke/mbsa.ps1
rm srv1.xlsx -ErrorAction Ignore
[xml](gc .\srv1.mbsa) | % secscan |
Export-Excel srv1.xlsx -AutoSize -TableName table -Show
# Read the new spreadsheet
# Import-Excel .\srv1.xlsx
# read, export to csv
# Import-Excel .\srv1.xlsx | Export-Csv -NotType srv1.csv