Saturday, February 25, 2012

Generalized Second-Price Auctions

    In an auction, a bidder in position i will never want to pay more than one bid increment above the bid of the advertiser in position (i + 1), and Google adopted this principle in its newly-designed generalized second price (GSP) auction mechanism. In the simplest GSP auction, an advertiser in position i pays a price per click equal to the bid of an advertiser in position (i + 1) plus a minimum increment (typically $0.01). This second-price structure makes the market more user friendly and less susceptible to gaming. 

Note: 
1. Usually in practice, what an advertiser in position i pays is not what the theory states. To maximize revenue, the rank is often not based on bids, but on the product of each advertiser's bid and CTR. 
Then the  advertiser in position i should pay
                          bid(i+1)*CTR(i+1)/CTR(i) for per click.
2. Truth-telling is a dominant strategy under VCG, while truth-telling is not a dominant strategy under GSP. For instance, consider a slight modification of the example from Section 2. There are still three bidders, with values per click of $10, $4, and $2, and two positions. However, the click- through rates of these positions are now almost the same: the first position receives 200 clicks per hour, and the second one gets 199. If all players bid truthfully, then bidder 1’s payoff is equal to ($10 − $4) ∗ 200 = $1200. If, instead, he shades his bid and bids only $3 per click, he will get the second position, and his payoff will be equal to ($10 − $2) ∗ 199 = $1592 > $1200. 
3. If all advertisers were to bid the same amounts under GSP and VCG, then each advertiser’s payment would be at least as large under GSP as under VCG. 
4. GSP can achieve locally envy-free equilibrium B*. In this equilibrium, each bidder’s position and payment is equal to those in the dominant-strategy equilibrium of the game induced by VCG. In any other locally envy-free equilibrium of that GSP can achieve, the total revenue of the seller is at least as high as in B∗.

Reference:
[1]  Benjamin Edelman, Michael Ostrovsky, and Michael Schwarz. Internet Advertising and the Generalized Second-price Auction: Selling Billions of Dollars Worth of Key- words. American Economic Review, 97(1):242–259, 2007.

Saturday, February 11, 2012

SQL quere: page views by age of articles


SELECT
    Substring(FULL_URI, 0, POSITION('/' in FULL_URI)) DOMAIN,
    AGE+1 AGE,
    SUM(ALL_IMPRESSIONS) ALL_IMPRESSIONS,
    SUM(IMPRESSIONS) IMPRESSIONS,
    SUM(CLICKS) CLICKS
FROM
(
SELECT
    FULL_URI,
    cal.DAY,
    data1.MIN_PUBLISHED PUBLISHED,
    DAYS_BETWEEN(pub.MIN_PUBLISHED,cal.DAY) AGE,
    SUM(ALL_IMPRESSIONS) ALL_IMPRESSIONS,
    SUM(IMPRESSIONS) IMPRESSIONS,
    SUM(CLICKS) CLICKS
FROM
    DATASET1 data1
INNER JOIN
    DATASET2 data2
ON
    REGEXP_REPLACE(pub.URL, 'https?://', '' ) = data2.FULL_URI
INNER JOIN
    CALENDER_TABLE cal
ON
    data2.DAY_KEY = cal.DAY_KEY
WHERE
    URL LIKE '%p1.html'
AND
    cal.DAY BETWEEN '2011-01-01' AND '2012-01-01'
GROUP BY
    cal.DAY,
    FULl_URI,
    PUBLISHED
ORDER BY
    cal.DAY,
    PUBLISHED
) x
WHERE
    DOMAIN = 'channel'
AND
    AGE IS NOT NULL
GROUP BY
    DOMAIN,
    AGE
ORDER BY
    AGE
;

Saturday, February 4, 2012

Generalized First-Price Auctions

   It was introduced by Overture (now part of Yahoo!) in 1997 for selling internet advertising. In the original Overture auction design, each advertiser submitted a bid reporting the advertiser’s willingness to pay on a per-click basis, for a particular keyword. Advertising was was sold one click at a time (PPC). However, the mechanism was unstable due to the dynamic nature of the environment.
 
Example: Suppose there are two slots on a page and three bidders. An ad in the first slot receives 200 clicks per hour, while the second slot gets 100. Bidders 1, 2, and 3 have values per click of $10, $4, and $2, respectively. Suppose bidder 2 bids $2.01, to guarantee that he gets a slot. Then bidder 1 will not want to bid more than $2.02—he does not need to pay more than that to get the top spot. But then bidder 2 will want to revise his bid to $2.03 to get the top spot, bidder 1 will in turn raise his bid to $2.04, and so on. Clearly, there is no pure strategy equilibrium in the one-shot version of the game, and so if bidders best respond to each other, they will want to revise their bids as often as possible.



Reference:
[1]  Benjamin Edelman, Michael Ostrovsky, and Michael Schwarz. Internet Advertising and the Generalized Second-price Auction: Selling Billions of Dollars Worth of Key- words. American Economic Review, 97(1):242–259, 2007.